-
-
Save eyJhb/9caf7ac4af6dbb3c070e49d56d613393 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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
mypkg = pkgs.callPackage ./pkg.nix {}; | |
in mypkg.overrideAttrs(oldAttrs: rec { | |
config = "NEW config"; | |
}) |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
config = "thisismyconfig"; | |
in pkgs.stdenv.mkDerivation { | |
name = "test"; | |
phases = "buildPhase"; | |
config = config; | |
buildPhase = '' | |
echo ${config} > $out | |
''; | |
} |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
mypkg = pkgs.callPackage ./test2-pkg.nix {}; | |
in pkgs.callPackage mypkg.build { config = "lal"; } |
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
config = "thisismyconfig"; | |
build = cfg: pkgs.stdenv.mkDerivation { | |
name = "test"; | |
phases = "buildPhase"; | |
buildPhase = '' | |
echo ${cfg.config} > $out | |
''; | |
}; | |
in { | |
"config" = config; | |
"build" = pkgs.callPackage build { "config" = config; }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment