preserves-nim: init at 1.0.0
This package contains the "preserves_schema_nim" utility for generating Nim modules from Preserves schema. The nixpkgs input of the flake has been moved to bring in the "buildNimPackage" function, which is not yet in master. See https://github.com/NixOS/nixpkgs/pull/136489
This commit is contained in:
parent
bc090d1c3f
commit
89de6a658b
14
flake.lock
14
flake.lock
|
@ -17,16 +17,18 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1630572390,
|
||||
"narHash": "sha256-xPqD/SFQ/QKxR85ZQ/WkNEAI6yfCW0XFXmmWBp2KKLw=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1630679442,
|
||||
"narHash": "sha256-wPCqej7mCmt8g4OXDQE/SCyhNF72GS9ws5pzmCiM/C0=",
|
||||
"owner": "ehmry",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f6645fdf90d443c38fbc98125a4665f5e798e807",
|
||||
"rev": "8fbf6c0f2a1b973dde6707ab471910312312b225",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
"owner": "ehmry",
|
||||
"ref": "nimPackages",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
description = "Syndicate utilities";
|
||||
|
||||
inputs.nixpkgs.url = "github:ehmry/nixpkgs/nimPackages";
|
||||
inputs.rust.url = "github:oxalica/rust-overlay";
|
||||
|
||||
outputs = { self, nixpkgs, rust }:
|
||||
|
@ -14,13 +15,15 @@
|
|||
let rust' = (prev.extend rust.overlay).rust-bin.nightly.latest.default;
|
||||
in {
|
||||
lib = prev.lib.extend libOverlay;
|
||||
preserves-tools = final.callPackage ./preserves-tools { rust = rust'; };
|
||||
preserves-nim = final.callPackage ./preserves-nim { };
|
||||
preserves-tools =
|
||||
final.callPackage ./preserves-tools { rust = rust'; };
|
||||
syndicate-rs = final.callPackage ./syndicate-rs { rust = rust'; };
|
||||
};
|
||||
|
||||
packages = forEachSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}.extend self.overlay;
|
||||
in with pkgs; { inherit preserves-tools syndicate-rs; });
|
||||
in with pkgs; { inherit preserves-nim preserves-tools syndicate-rs; });
|
||||
|
||||
nixosModules.syndicate-server =
|
||||
# A little hack to apply our overlay to this module only.
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, nimPackages, fetchgit }:
|
||||
with nimPackages;
|
||||
|
||||
let
|
||||
bigints = fetchNimble {
|
||||
pname = "bigints";
|
||||
version = "0.5.0";
|
||||
hash = "sha256-zMTXXC0lYVzXaKl8eC/SA/CymRgovgzxBdvEn1VE9p0=";
|
||||
};
|
||||
|
||||
compiler = fetchNimble {
|
||||
pname = "compiler";
|
||||
version = "1.4.8";
|
||||
hash = "sha256-OaSe9Bn/+rjVk4pJKjjwI9rpnDm/T7lRmKeh/DOPn38=";
|
||||
};
|
||||
|
||||
npeg = fetchNimble {
|
||||
pname = "npeg";
|
||||
version = "0.24.1";
|
||||
hash = "sha256-AKYDrR38345CQxV7kLvglGmkc/m8EX6TGtaFckJL3Dc=";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
buildInputs = [ compiler bigints npeg ];
|
||||
}
|
Loading…
Reference in New Issue