1 { lib, pkgs, stdenv, fetchFromGitHub, python3, nix, git, makeWrapper
3 let self = stdenv.mkDerivation rec {
6 src = fetchFromGitHub {
9 rev = "version-${version}";
10 sha256 = "1pccvc0iqapms7kidrh09g5fdx44x622r5l9k7bkmssp3v4c68vy";
12 nativeBuildInputs = [ makeWrapper ];
13 buildInputs = [ python3 ];
16 cp -r bin share "$out"
17 wrapProgram $out/bin/nix-pin \
18 --prefix PATH : "${lib.makeBinPath [ nix git ]}"
22 defaults = import "${self}/share/nix/defaults.nix";
24 api = { pinConfig ? defaults.pinConfig }:
25 let impl = import "${self}/share/nix/api.nix" { inherit pkgs pinConfig; }; in
26 { inherit (impl) augmentedPkgs pins callPackage; };
32 ${pkgs.nix-update-source}/bin/nix-update-source \
34 --replace-attr version \
35 --set owner timbertson \
37 --set type fetchFromGitHub \
38 --set rev 'version-{version}' \
39 --substitute rev 'version-''${{version}}' \
40 --modify-nix default.nix
44 homepage = "https://github.com/timbertson/nix-pin";
45 description = "nixpkgs development utility";
46 license = licenses.mit;
47 maintainers = [ maintainers.timbertson ];
48 platforms = platforms.all;
49 mainProgram = "nix-pin";