Update Rust stuff (broken because the language is unstable)

This commit is contained in:
Emery Hemingway 2022-09-06 12:08:01 -05:00
parent 3f4c5ae37e
commit 03374806ab
4 changed files with 62 additions and 77 deletions

View File

@ -1,27 +1,30 @@
{ {
"nodes": { "nodes": {
"flake-utils": { "naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": { "locked": {
"lastModified": 1637014545, "lastModified": 1662220400,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"owner": "numtide", "owner": "nix-community",
"repo": "flake-utils", "repo": "naersk",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "nix-community",
"repo": "flake-utils", "repo": "naersk",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1656338871, "lastModified": 1662096612,
"narHash": "sha256-+LOvZFt3MpWtrxXLH4igQtRVzyD43VnuTJjDVbt7phY=", "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "819e4d63fc7f337a822a049fd055cd7615a5e0d6", "rev": "21de2b973f9fee595a7a1ac4693efff791245c34",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -31,29 +34,11 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "naersk": "naersk",
"rust": "rust"
}
},
"rust": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"naersk",
"nixpkgs" "nixpkgs"
] ]
},
"locked": {
"lastModified": 1656384549,
"narHash": "sha256-hUe2t7//B9U9SSODAplfzdKkwxwO4kHsPX2k0y95SUU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "61df523b5c22665d89710d9985cf5afe751d703f",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
} }
} }
}, },

View File

@ -1,19 +1,24 @@
{ {
description = "Syndicate utilities"; description = "Syndicate utilities";
inputs.rust = { inputs.naersk.url = "github:nix-community/naersk";
url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "naersk/nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, rust }: { outputs = { self, naersk, nixpkgs, }: {
lib = nixpkgs.lib.extend (import ./lib.nix); lib = nixpkgs.lib.extend (import ./lib.nix);
overlays.default = final: prev: overlays.default = final: prev: {
let rust' = (prev.extend rust.overlay).rust-bin.nightly.latest.default;
in {
inherit (self) lib; inherit (self) lib;
fetchFromSyndicateLang =
{ owner ? "syndicate-lang", repo, rev, hash ? prev.lib.fakeHash }:
prev.fetchFromGitea {
domain = "git.syndicate-lang.org";
inherit owner repo rev hash;
};
naersk = prev.callPackage naersk { };
nimPackages = prev.nimPackages.overrideScope' (final': prev': { nimPackages = prev.nimPackages.overrideScope' (final': prev': {
preserves = final'.callPackage ./preserves-nim { }; preserves = final'.callPackage ./preserves-nim { };
syndicate = final'.callPackage ./syndicate-nim { }; syndicate = final'.callPackage ./syndicate-nim { };
@ -28,13 +33,12 @@
}; };
}; };
preserves-tools = final.callPackage ./preserves-tools { rust = rust'; }; preserves-tools = final.callPackage ./preserves-tools { };
squeak = final.callPackage ./squeak { }; squeak = final.callPackage ./squeak { };
squeaker = final.python3Packages.callPackage ./squeaker { }; squeaker = final.python3Packages.callPackage ./squeaker { };
syndicate-server = syndicate-server = final.callPackage ./syndicate-server { };
final.callPackage ./syndicate-server { rust = rust'; };
}; };
legacyPackages = legacyPackages =

View File

@ -1,22 +1,18 @@
{ lib, rustPlatform, rust, fetchCrate }: { lib, naersk, fetchCrate }:
rustPlatform.buildRustPackage rec { naersk.buildPackage rec {
pname = "preserves-tool"; pname = "preserves-tools";
# use the name of the actual utility so that
# nix run …#preserves-tools works as expected.
version = "2.3.0"; version = "2.5.0";
src = fetchCrate { src = fetchCrate {
pname = "preserves-tools"; # name of the crate inherit pname version;
inherit version; sha256 = "sha256-OFL56fJQdv04QxfIPqDS1WO+H9ApcLgCZtpKq9cMlSs=";
sha256 = "sha256-I9dqY2pej/HRQg2VGkEoWKOlo4c9TYwk/jw23eN1nlU=";
}; };
cargoHash = "sha256-0UMGDoyfdEJQQDoUadbU6Ev6yA2k0sQHRvO/Z+4QF5g=";
nativeBuildInputs = [ rust ];
meta = { meta = {
description = "Swiss army knife for working with Preserves documents"; description = "Swiss army knife for working with Preserves documents";
homepage = "https://preserves.gitlab.io/preserves/doc/preserves-tool.html"; homepage = "https://preserves.gitlab.io/preserves/doc/preserves-tool.html";
maintainers = with lib.maintainers; [ ehmry ]; maintainers = with lib.maintainers; [ ehmry ];
mainProgram = "preserves-tool";
}; };
} }

View File

@ -1,22 +1,22 @@
# https://git.syndicate-lang.org/synit/synit/src/branch/main/packaging/packages/syndicate-server/APKBUILD # https://git.syndicate-lang.org/synit/synit/src/branch/main/packaging/packages/syndicate-server/APKBUILD
{ lib, rustPlatform, rust, fetchgit, pkg-config, openssl }: { lib, naersk, fetchFromSyndicateLang, pkg-config, openssl }:
rustPlatform.buildRustPackage rec { naersk.buildPackage rec {
pname = "syndicate-server"; pname = "syndicate-rs";
version = "0.24.0"; version = "0.26.0";
src = fetchgit { src = fetchFromSyndicateLang {
url = "https://git.syndicate-lang.org/syndicate-lang/syndicate-rs.git"; repo = pname;
rev = "${pname}-v${version}"; rev = "${pname}-v${version}";
sha256 = "sha256-91dGi7CyI/6XkbpWbFtnb6XACIExHX/6XYVkKlkDTzc="; hash = "sha256-6zCfvvaDfOUWbKjLhJ9xMpQnajxt1sQObrdhnm06Zuc=";
}; };
cargoHash = "sha256-MXchqX8wvMwnT2Js0YVIgOKsZuGglnKRg3HsuyOgBsI="; nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ rust pkg-config ];
buildInputs = [ openssl ]; buildInputs = [ openssl ];
meta = { meta = {
description = "Syndicate broker server"; description = "Syndicate broker server";
homepage = "https://git.syndicate-lang.org/syndicate-lang/syndicate-rs/"; homepage = "https://git.syndicate-lang.org/syndicate-lang/syndicate-rs/";
maintainers = with lib.maintainers; [ ehmry ]; maintainers = with lib.maintainers; [ ehmry ];
mainProgram = "syndicate-server";
}; };
} }