Package syndicate-rs

This commit is contained in:
Emery Hemingway 2021-09-02 12:16:35 +02:00
commit 040294dbf2
3 changed files with 117 additions and 0 deletions

75
flake.lock Normal file
View File

@ -0,0 +1,75 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1623875721,
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1630572390,
"narHash": "sha256-xPqD/SFQ/QKxR85ZQ/WkNEAI6yfCW0XFXmmWBp2KKLw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f6645fdf90d443c38fbc98125a4665f5e798e807",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1628186154,
"narHash": "sha256-r2d0wvywFnL9z4iptztdFMhaUIAaGzrSs7kSok0PgmE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "06552b72346632b6943c8032e57e702ea12413bf",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust": "rust"
}
},
"rust": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1630548746,
"narHash": "sha256-SLzeWhEN0kRDTzL+AHfDxwbYEZm09UEcdIcPDdOIZew=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "00f6332f8c690480c7b7137fb8b1f069e7b2e18a",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

28
flake.nix Normal file
View File

@ -0,0 +1,28 @@
{
description = "Syndicate helper";
inputs.rust.url = "github:oxalica/rust-overlay";
outputs = { self, nixpkgs, rust }:
let forEachSystem = nixpkgs.lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
in {
overlay = final: prev:
with final; {
syndicate-rs = callPackage ./syndicate-rs {
rust = rust-bin.nightly.latest.default;
};
};
legacyPackages = forEachSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in (pkgs.extend rust.overlay).extend self.overlay);
packages = forEachSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in with (pkgs.extend rust.overlay).extend self.overlay; {
inherit syndicate-rs;
});
};
}

14
syndicate-rs/default.nix Normal file
View File

@ -0,0 +1,14 @@
{ lib, rustPlatform, rust, fetchgit, pkg-config, openssl }:
rustPlatform.buildRustPackage rec {
pname = "syndicate-rs";
version = "2021-09-01";
src = fetchgit {
url = "https://git.syndicate-lang.org/syndicate-lang/syndicate-rs.git";
rev = "622115e13c69397dfa0beb433fdaf382949252b3";
sha256 = "sha256-7XcCiDlUntLRB0MLYk+57RSe4f6NyqRa/Jc42xrPOnQ=";
};
cargoHash = "sha256-sagyE3yCmSNwqgZrgnw1ar7S37iZhVYYpn3WtIoBIU8=";
nativeBuildInputs = [ rust pkg-config ];
buildInputs = [ openssl ];
}