compat nixpkgs and change to testing-python.nix

This commit is contained in:
GTrunSec 2021-04-03 22:37:13 -07:00
parent 842c903201
commit 8f0e518bc0
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
3 changed files with 36 additions and 9 deletions

17
lib/compat.nix Normal file
View file

@ -0,0 +1,17 @@
let
inherit (builtins)
fetchTarball
fromJSON
readFile
;
lockfile = fromJSON (readFile ../flake.lock);
in
input:
let
locked = lockfile.nodes."${input}".locked;
inherit (locked) rev narHash owner repo;
in
fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
sha256 = narHash;
}