add flake environment
This commit is contained in:
parent
9d04e47161
commit
47372c662e
1 changed files with 64 additions and 0 deletions
64
flake.nix
Normal file
64
flake.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
description = "devshell-shfx";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
defaultSystems = ["aarch64-darwin" "aarch64-linux" "i686-linux" "x86_64-darwin" "x86_64-linux"];
|
||||
|
||||
forAllSystems = f:
|
||||
nixpkgs.lib.genAttrs defaultSystems (system:
|
||||
f system (import nixpkgs {
|
||||
inherit system;
|
||||
overlays = builtins.attrValues self.overlays;
|
||||
}));
|
||||
in {
|
||||
overlays.default = final: prev: {
|
||||
shfx = final.buildNimPackage (finalAttrs: {
|
||||
pname = "shfx";
|
||||
version = "0.0.1";
|
||||
|
||||
src = final.fetchFromGitea {
|
||||
domain = "forge.imbored.dev";
|
||||
owner = "emileclarkb";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "9d04e47161219b4cd2d7f732bb9a40a25e5c93e5";
|
||||
hash = "sha256-d3gl38/5W2WWsYpRZ/TDNo2bpgVZvpuc/2yvVpvWQxI=";
|
||||
};
|
||||
|
||||
nimRelease = true;
|
||||
|
||||
nimbleFile = ./shfx.nimble;
|
||||
lockFile = ./lock.json;
|
||||
|
||||
nimFlags = ["-d:NimblePkgVersion=${finalAttrs.version}"];
|
||||
});
|
||||
};
|
||||
|
||||
devShells = forAllSystems (
|
||||
system: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nim
|
||||
nimble
|
||||
|
||||
shfx
|
||||
];
|
||||
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
checks = self.packages;
|
||||
packages = forAllSystems (system: pkgs: rec {
|
||||
default = shfx;
|
||||
shfx = pkgs.shfx;
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue