Update preserves-nim

Build and install the utilities.
This commit is contained in:
Emery Hemingway 2021-09-25 14:35:05 +02:00
parent 7ce42d6fd9
commit e65febdb5b
2 changed files with 19 additions and 9 deletions

View File

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1632386563,
"narHash": "sha256-8X0nNHyIQYLpcxbE4WSO5+Q5u9/3vB5n00dKP5mRP2I=",
"lastModified": 1632570486,
"narHash": "sha256-1CPYfW5dgquaizUwJPtCL+9xu1peHWixLN2DI62oJoQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bc2ba06323f101f413abe38736c1330388272ffd",
"rev": "f05a99e116df08af551c7c49e7d4aa4020d43acd",
"type": "github"
},
"original": {

View File

@ -1,4 +1,4 @@
{ lib, nimPackages, fetchgit }:
{ lib, nimPackages, fetchFromSourcehut }:
with nimPackages;
let
@ -22,12 +22,22 @@ let
in buildNimPackage rec {
outputs = [ "out" "dev" ];
pname = "preserves";
version = "1.0.0";
src = fetchgit {
url = "https://git.sr.ht/~ehmry/preserves-nim";
rev = "v${version}";
sha256 = "18702q7vmyf5kkgn9nqf96kcar5pqxisf03ybrqw3hfp95vxixn4";
version = "1.1.0";
src = fetchFromSourcehut {
owner = "~ehmry";
repo = "preserves-nim";
rev = "2dd63903f05b963aaefcc7a12bb11b078ae7eed5";
sha256 = "sha256-qBoAAZ2ixpqX9UWEAh/Bs0cYo+u3CW8dIk5Kfr9+HMc=";
};
buildInputs = [ compiler bigints npeg ];
postInstall = ''
pushd $out/bin
for link in preserves_decode preserves_from_json preserves_to_json;
do ln -s preserves_encode $link
done
popd
'';
doCheck = true;
}