nfm/flake.nix
2024-08-25 19:49:20 +02:00

44 lines
962 B
Nix

{
description = "NFM - Neat File Manager.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs =
{ self
, nixpkgs
, utils
,
}: utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
in
rec
{
packages.nfm = pkgs.stdenv.mkDerivation {
name = "nfm";
src = ./.;
dontConfigure = true;
dontFixup = true;
nativeBuildInputs = with pkgs; [ zig_0_13.hook ];
postPatch = ''
mkdir -p $ZIG_GLOBAL_CACHE_DIR
ln -s ${pkgs.callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
};
packages.default = packages.nfm;
devShells.default = nixpkgs.legacyPackages.${system}.mkShell {
buildInputs = with pkgs; [
zig_0_13
];
};
});
}