Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com> Co-authored-by: Cool Developer <cool199966@outlook.com>
65 lines
1.7 KiB
Nix
65 lines
1.7 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/master";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
gomod2nix = {
|
|
url = "github:nix-community/gomod2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, gomod2nix, flake-utils }:
|
|
{
|
|
overlays.default = self: super: {
|
|
simd = self.callPackage ./simapp { rev = self.shortRev or "dev"; };
|
|
rocksdb = super.rocksdb.overrideAttrs (_: rec {
|
|
version = "8.9.1";
|
|
src = self.fetchFromGitHub {
|
|
owner = "facebook";
|
|
repo = "rocksdb";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-Pl7t4FVOvnORWFS+gjy2EEUQlPxjLukWW5I5gzCQwkI=";
|
|
};
|
|
});
|
|
};
|
|
} //
|
|
(flake-utils.lib.eachDefaultSystem
|
|
(system:
|
|
let
|
|
mkApp = drv: {
|
|
type = "app";
|
|
program = "${drv}/bin/${drv.meta.mainProgram}";
|
|
};
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = { };
|
|
overlays = [
|
|
gomod2nix.overlays.default
|
|
self.overlays.default
|
|
];
|
|
};
|
|
in
|
|
rec {
|
|
packages = rec {
|
|
default = simd;
|
|
inherit (pkgs) simd;
|
|
};
|
|
apps = rec {
|
|
default = simd;
|
|
simd = mkApp pkgs.simd;
|
|
};
|
|
devShells = rec {
|
|
default = simd;
|
|
simd = with pkgs; mkShell {
|
|
buildInputs = [
|
|
go_1_21 # Use Go 1.21 version
|
|
rocksdb
|
|
];
|
|
};
|
|
};
|
|
legacyPackages = pkgs;
|
|
}
|
|
));
|
|
}
|