nixpkgs/pkgs/tools/package-management/nix-pin/default.nix

33 lines
847 B
Nix
Raw Normal View History

2018-03-20 10:37:09 +00:00
{ pkgs, stdenv, fetchFromGitHub, mypy, python3 }:
let self = stdenv.mkDerivation rec {
name = "nix-pin-${version}";
version = "0.1.2";
2018-03-20 10:37:09 +00:00
src = fetchFromGitHub {
owner = "timbertson";
repo = "nix-pin";
rev = "version-0.1.2";
sha256 = "1zwfb5198qzbjwivgiaxbwva9frgrrqaj92nw8vz95yi08pijssh";
2018-03-20 10:37:09 +00:00
};
buildInputs = [ python3 mypy ];
buildPhase = ''
mypy bin/*
'';
installPhase = ''
mkdir "$out"
cp -r bin share "$out"
'';
passthru = {
callWithPins = path: args:
import "${self}/share/nix/call.nix" {
inherit pkgs path args;
};
};
2018-03-20 10:37:09 +00:00
meta = with stdenv.lib; {
homepage = "https://github.com/timbertson/nix-pin";
description = "nixpkgs development utility";
license = licenses.mit;
maintainers = [ maintainers.timbertson ];
platforms = platforms.all;
};
}; in self