-
-
Save cleverca22/ff172de384fa9240d70f35772abd98e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let | |
callPackage = newScope self; | |
self = { | |
foo = callPackage ./foo.nix {}; | |
other = callPackage ./other.nix {}; | |
}; | |
in self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
someVar ? false | |
, stdenv, fetchurl, something, somethingelse, perl | |
}: | |
with stdenv.lib; | |
let | |
version = "2.0"; | |
in stdenv.mkDerivation rec { | |
name = "foo-${version}"; | |
src = fetchurl { | |
# ... | |
}; | |
buildInputs = [ something ] | |
++ optional (stdenv.isLinux || stdenv.isFreeBSD) somethingelse; | |
nativeBuildInputs = [ perl ]; | |
configureFlags = [] | |
++ optional someVar "--some-setting" | |
; | |
enableParallelBuilding = true; | |
meta = { | |
# ... | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, foo }: | |
stdenv.mkDerivation rec { | |
... | |
buildInputs = [ foo ]; | |
configureFlags = [ | |
"VAR=${foo}/bin/somebin" | |
]; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment