Compare commits

...

3 Commits

Author SHA1 Message Date
Emery Hemingway 5636c83a08 preserves-nim: 1.1.0 -> 2.0.0 2021-10-17 14:25:51 +02:00
Emery Hemingway 0a801cfaea Update URLs in README 2021-10-17 14:25:34 +02:00
Emery Hemingway e65febdb5b Update preserves-nim
Build and install the utilities.
2021-09-25 14:35:19 +02:00
3 changed files with 21 additions and 10 deletions

View File

@ -2,7 +2,7 @@
To add to your local flake registry:
```sh
nix registry add syndicate "git+https://git.sr.ht/~ehmry/syndicate-flake?ref=trunk"
nix registry add syndicate "git+https://git.syndicate-lang.org/ehmry/syndicate-flake.git?ref=trunk"
```
## NixOS service
@ -12,7 +12,7 @@ To import the NixOS module:
```nix
{
# /etc/nixos/flake.nix
inputs.syndicate.url = "git+https://git.sr.ht/~ehmry/syndicate-flake";
inputs.syndicate.url = "git+https://git.syndicate-lang.org/ehmry/syndicate-flake.git?ref=trunk";
outputs = { self, nixpkgs, syndicate }: {

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, fetchFromGitea }:
with nimPackages;
let
@ -22,12 +22,23 @@ let
in buildNimPackage rec {
outputs = [ "out" "dev" ];
pname = "preserves";
version = "1.0.0";
src = fetchgit {
url = "https://git.sr.ht/~ehmry/preserves-nim";
version = "2.0.0";
src = fetchFromGitea {
domain = "git.syndicate-lang.org";
owner = "ehmry";
repo = "preserves-nim";
rev = "v${version}";
sha256 = "18702q7vmyf5kkgn9nqf96kcar5pqxisf03ybrqw3hfp95vxixn4";
sha256 = "sha256-DRncKqq9+2WR1V1EeTnAh7ObCUNqfz7hp8onrCi1mlA=";
};
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;
}