isle/nix/pkgs.nix
Brian Picciano 68f417b5ba Upgrade garage to v1.0.0
This required switching all garage admin API calls to the new v1
versions, and redoing how the global bucket key is created so it is
created via the "create key" API call.
2024-06-11 16:57:31 +02:00

65 lines
1.6 KiB
Nix

rec {
overlays = [
# Make buildGoModules use static compilation by default
(final: prev: let
buildArgs = {
doCheck = false;
CGO_ENABLED=0;
tags = [ "netgo" "timetzdata" ];
ldflags = [ "-w" "-extldflags=-static" ];
};
in {
buildGoModule = args: prev.buildGoModule (buildArgs // args);
})
# for whatever reason git checks fail when flake is being used (or maybe
# it's crossSystem's fault)
(final: prev: {
git = prev.git.overrideAttrs (oldAttrs: {
installCheckPhase = ''
# noop
'';
});
})
];
version = "24.05";
rev = "5646423bfac84ec68dfc60f2a322e627ef0d6a95";
src = fetchTarball {
name = "nixpkgs-${version}";
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
sha256 = "sha256:1lr1h35prqkd1mkmzriwlpvxcb34kmhc9dnr48gkm8hh089hifmx";
};
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
# rpi, TODO remember why this is disabled, try to re-enable it
#"armv7l-linux-musl"
"i686-linux"
];
default = {
buildSystem,
hostSystem ? buildSystem,
}: import src ({
inherit overlays;
system = buildSystem;
} // (if buildSystem == hostSystem then {} else {
# The nixpkgs cache doesn't have any packages where cross-compiling has been
# enabled, even if the target platform is actually the same as the build
# platform (and therefore it's not really cross-compiling). So we only set
# up the cross-compiling config if the target platform is different.
crossSystem.config = hostSystem;
}));
}