58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
rec {
|
|
|
|
version = "1.0.0";
|
|
|
|
package = {
|
|
pkgsNix,
|
|
buildSystem,
|
|
hostSystem,
|
|
}: let
|
|
|
|
pkgs = pkgsNix.default {
|
|
inherit buildSystem hostSystem;
|
|
};
|
|
|
|
src = pkgs.applyPatches {
|
|
name = "garage-v${version}-patched";
|
|
src = builtins.fetchGit {
|
|
name = "garage-v${version}";
|
|
url = "https://git.deuxfleurs.fr/Deuxfleurs/garage.git";
|
|
rev = "ff093ddbb8485409f389abe7b5e569cb38d222d2";
|
|
};
|
|
patches = [
|
|
./common-nix-system.patch
|
|
];
|
|
};
|
|
|
|
common = (import "${src}/nix/common.nix") {
|
|
system = buildSystem;
|
|
};
|
|
|
|
compile = (import "${src}/nix/compile.nix") {
|
|
|
|
system = buildSystem;
|
|
target = hostSystem;
|
|
pkgsSrc = pkgsNix.src;
|
|
|
|
cargo2nixOverlay = common.cargo2nixOverlay;
|
|
|
|
release = true;
|
|
git_version = version;
|
|
|
|
# subset of the default release features, as defined in:
|
|
# https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/ff093ddbb8485409f389abe7b5e569cb38d222d2/nix/compile.nix#L171
|
|
features = [
|
|
"garage/bundled-libs"
|
|
"garage/lmdb"
|
|
"garage/sqlite"
|
|
"garage/metrics"
|
|
"garage/syslog"
|
|
];
|
|
};
|
|
|
|
in
|
|
compile.workspace.garage {
|
|
compileMode = "build";
|
|
};
|
|
}
|