1 { lib, pkgs, stdenv, fetchFromGitHub, mypy, 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 mypy ];
19 cp -r bin share "$out"
20 wrapProgram $out/bin/nix-pin \
21 --prefix PATH : "${lib.makeBinPath [ nix git ]}"
25 defaults = import "${self}/share/nix/defaults.nix";
27 api = { pinConfig ? defaults.pinConfig }:
28 let impl = import "${self}/share/nix/api.nix" { inherit pkgs pinConfig; }; in
29 { inherit (impl) augmentedPkgs pins callPackage; };
35 ${pkgs.nix-update-source}/bin/nix-update-source \
37 --replace-attr version \
38 --set owner timbertson \
40 --set type fetchFromGitHub \
41 --set rev 'version-{version}' \
42 --substitute rev 'version-''${{version}}' \
43 --modify-nix default.nix
47 homepage = "https://github.com/timbertson/nix-pin";
48 description = "nixpkgs development utility";
49 license = licenses.mit;
50 maintainers = [ maintainers.timbertson ];
51 platforms = platforms.all;