Skip to content

Instantly share code, notes, and snippets.

@samueldr

samueldr/pin.nix Secret

Created October 4, 2018 23:38
Show Gist options
  • Save samueldr/af181217e80746144249881dc381da88 to your computer and use it in GitHub Desktop.
Save samueldr/af181217e80746144249881dc381da88 to your computer and use it in GitHub Desktop.
args:
import (builtins.fetchTarball {
name = "my-pinned-nixpkgs";
url = https://github.com/nixos/nixpkgs/archive/f2b3bbe44e4f7e220ecb1308d1acdac5e6a0f8ba.tar.gz;
sha256 = "139ai0dp4yrr9p0wsgckb9g3ykzf47my0z3jfbc8ypfw7fzf6f5c";
})
(args // {
overlays = [
(self: super: {
pkgsinfo = super.writeShellScriptBin "pkgsinfo" ''
#!/usr/bin/env bash
echo ${super.path}
'';
})
];
})
with (import <nixpkgs> {});
stdenv.mkDerivation {
#NIX_DEBUG=2;
name = "testing";
prePatch = ''
env | grep foo
env | grep bar
exit 1
'';
foo = "foo";
bar = lib.optional false "bar";
src = ./test.nix;
unpackPhase = ":";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment