# Pastebin qYqmrf4U { nixpkgs ? import { config = { allowUnsupportedSystem = true; }; } , compiler ? "default", doBenchmark ? false }: let inherit (nixpkgs) pkgs; haskellLib = import { inherit pkgs; inherit (pkgs) lib; } ; f = { mkDerivation, array, attoparsec, base, bmp, bytestring , containers, cpphs, directory, either, filepath, free, gloss_1_13_0_1 , gloss-juicy, hashable, Hclip, hint, hosc, JuicyPixels, language-c , lens, mmorph, MoodlerLib, mtl, optparse-applicative, PortMidi , pretty, process, stdenv, syb, temporary, text, transformers , uniplate, unix , portaudio }: mkDerivation rec { pname = "Moodler"; version = "0.1.0.0"; src = ./.; isLibrary = false; isExecutable = true; executableHaskellDepends = [ array attoparsec bmp bytestring containers cpphs directory either filepath free gloss_1_13_0_1 gloss-juicy hashable Hclip hint hosc JuicyPixels language-c lens mmorph MoodlerLib mtl optparse-applicative PortMidi pretty process syb temporary text transformers uniplate unix ]; librarySystemDepends = [ portaudio ]; description = "A modular synthesiser"; license = stdenv.lib.licenses.bsd2; shellHook = '' export C_INCLUDE_PATH = \ ${stdenv.lib.makeSearchPathOutput "dev" "include" librarySystemDepends} export LIBRARY_PATH = \ ${stdenv.lib.makeLibraryPath librarySystemDepends} ''; FOO="foo"; }; haskellPackages = if compiler == "default" then pkgs.haskellPackages else pkgs.haskell.packages.${compiler}; modifiedHaskellPackages = haskellPackages.override { overrides = self: super: { MoodlerLib = self.callPackage ../MoodlerLib {}; gloss-juicy = super.gloss-juicy.override { gloss = super.gloss_1_13_0_1; }; }; }; variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; drv = variant (modifiedHaskellPackages.callPackage f {}); in if pkgs.lib.inNixShell then drv.env else drv