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

32 lines
860 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}";
2018-04-22 00:28:11 +00:00
version = "0.2.2";
2018-03-20 10:37:09 +00:00
src = fetchFromGitHub {
owner = "timbertson";
repo = "nix-pin";
2018-04-22 00:28:11 +00:00
rev = "version-0.2.2";
sha256 = "1kw43kzy4m6lnnif51r2a8i4vcgr7d4vqb1c75p7pk2b9y3jwxsz";
2018-03-20 10:37:09 +00:00
};
buildInputs = [ python3 mypy ];
buildPhase = ''
mypy bin/*
'';
installPhase = ''
mkdir "$out"
cp -r bin share "$out"
'';
2018-04-22 00:28:11 +00:00
passthru =
let api = import "${self}/share/nix/api.nix" { inherit pkgs; }; in
{
inherit (api) augmentedPkgs pins callPackage;
};
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