mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
Nixpkgs and `rust-rocksdb` line up so we can drop our RocksDB input for
the time being.
Flake lock file updates:
• Updated input 'attic':
'github:zhaofengli/attic/6eabc3f02fae3683bffab483e614bebfcd476b21' (2024-02-14)
→ 'github:zhaofengli/attic/4dbdbee45728d8ce5788db6461aaaa89d98081f0' (2024-03-29)
• Updated input 'attic/nixpkgs':
'github:NixOS/nixpkgs/aa9d4729cbc99dabacb50e3994dcefb3ea0f7447' (2023-12-14)
→ 'github:NixOS/nixpkgs/07262b18b97000d16a4bdb003418bd2fb067a932' (2024-03-25)
• Updated input 'attic/nixpkgs-stable':
'github:NixOS/nixpkgs/1e2e384c5b7c50dbf8e9c441a9e58d85f408b01f' (2023-12-17)
→ 'github:NixOS/nixpkgs/44733514b72e732bd49f5511bd0203dea9b9a434' (2024-03-26)
• Updated input 'crane':
'github:ipetkov/crane/55f4939ac59ff8f89c6a4029730a2d49ea09105f' (2024-04-21)
→ 'github:ipetkov/crane/109987da061a1bf452f435f1653c47511587d919' (2024-05-24)
• Updated input 'fenix':
'github:nix-community/fenix/c8943ea9e98d41325ff57d4ec14736d330b321b2' (2024-03-05)
→ 'github:nix-community/fenix/b6fc5035b28e36a98370d0eac44f4ef3fd323df6' (2024-05-22)
• Updated input 'fenix/rust-analyzer-src':
'github:rust-lang/rust-analyzer/9f14343f9ee24f53f17492c5f9b653427e2ad15e' (2024-03-04)
→ 'github:rust-lang/rust-analyzer/21ec8f523812b88418b2bfc64240c62b3dd967bd' (2024-05-19)
• Updated input 'flake-utils':
'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28)
→ 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
• Updated input 'nix-filter':
'github:numtide/nix-filter/3449dc925982ad46246cfc36469baf66e1b64f17' (2024-01-15)
→ 'github:numtide/nix-filter/3342559a24e85fc164b295c3444e8a139924675b' (2024-03-11)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03)
→ 'github:NixOS/nixpkgs/5710852ba686cc1fd0d3b8e22b3117d43ba374c2' (2024-05-21)
• Removed input 'rocksdb'
93 lines
2.8 KiB
Nix
93 lines
2.8 KiB
Nix
{
|
|
# Keep sorted
|
|
inputs = {
|
|
attic.url = "github:zhaofengli/attic?ref=main";
|
|
crane = { url = "github:ipetkov/crane?ref=master"; inputs.nixpkgs.follows = "nixpkgs"; };
|
|
fenix = { url = "github:nix-community/fenix?ref=main"; inputs.nixpkgs.follows = "nixpkgs"; };
|
|
flake-compat = { url = "github:edolstra/flake-compat?ref=master"; flake = false; };
|
|
flake-utils.url = "github:numtide/flake-utils?ref=main";
|
|
nix-filter.url = "github:numtide/nix-filter?ref=main";
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
|
};
|
|
|
|
outputs = inputs:
|
|
let
|
|
# Keep sorted
|
|
mkScope = pkgs: pkgs.lib.makeScope pkgs.newScope (self: {
|
|
craneLib =
|
|
(inputs.crane.mkLib pkgs).overrideToolchain self.toolchain;
|
|
|
|
default = self.callPackage ./nix/pkgs/default {};
|
|
|
|
inherit inputs;
|
|
|
|
oci-image = self.callPackage ./nix/pkgs/oci-image {};
|
|
|
|
shell = self.callPackage ./nix/shell.nix {};
|
|
|
|
# The Rust toolchain to use
|
|
toolchain = inputs
|
|
.fenix
|
|
.packages
|
|
.${pkgs.pkgsBuildHost.system}
|
|
.fromToolchainFile {
|
|
file = ./rust-toolchain.toml;
|
|
|
|
# See also `rust-toolchain.toml`
|
|
sha256 = "sha256-SXRtAuO4IqNOQq+nLbrsDFbVk+3aVA8NNpSZsKlVH/8=";
|
|
};
|
|
});
|
|
in
|
|
inputs.flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
packages = {
|
|
default = (mkScope pkgs).default;
|
|
oci-image = (mkScope pkgs).oci-image;
|
|
}
|
|
//
|
|
builtins.listToAttrs
|
|
(builtins.concatLists
|
|
(builtins.map
|
|
(crossSystem:
|
|
let
|
|
binaryName = "static-${crossSystem}";
|
|
pkgsCrossStatic =
|
|
(import inputs.nixpkgs {
|
|
inherit system;
|
|
crossSystem = {
|
|
config = crossSystem;
|
|
};
|
|
}).pkgsStatic;
|
|
in
|
|
[
|
|
# An output for a statically-linked binary
|
|
{
|
|
name = binaryName;
|
|
value = (mkScope pkgsCrossStatic).default;
|
|
}
|
|
|
|
# An output for an OCI image based on that binary
|
|
{
|
|
name = "oci-image-${crossSystem}";
|
|
value = (mkScope pkgsCrossStatic).oci-image;
|
|
}
|
|
]
|
|
)
|
|
[
|
|
"x86_64-unknown-linux-musl"
|
|
"aarch64-unknown-linux-musl"
|
|
]
|
|
)
|
|
);
|
|
|
|
devShells.default = (mkScope pkgs).shell;
|
|
}
|
|
)
|
|
//
|
|
{
|
|
nixosModules.default = import ./nix/modules/default inputs;
|
|
};
|
|
}
|