Files
nix-flake/modules/packages/biri.nix
T

40 lines
1.3 KiB
Nix

{ inputs, self, ... }: {
perSystem = { pkgs, ... }: {
packages = let
finalAttrs = rec {
name = "${pname}-${version}";
pname = "biri";
version = "26.04";
src = pkgs.fetchFromGitHub {
owner = "barrulus";
repo = pname;
rev = "82efb3c0fb688a0c738d15517a2e6a44ed7ca703";
hash = "sha256-Gg4UHnugGnVZifxfKRUnxt3T+DSPgUvHEfE9tflA5zM=";
};
cargoHash = "sha256-aNovCzrTtmqTO33YtZap47npdN73zXC1bap5q5dZvZk=";
};
overrideAttrs = with pkgs; prev: {
rustPlatform = prev.rustPlatform // {
buildRustPackage = args: pkgs.rustPlatform.buildRustPackage (args finalAttrs // finalAttrs);
};
};
in {
biri = pkgs.niri.override (prev: overrideAttrs prev);
biri-unwrapped = pkgs.niri.override (prev: (overrideAttrs prev) // {
rustPlatform = (overrideAttrs prev).rustPlatform // {
buildRustPackage = args: pkgs.rustPlatform.buildRustPackage (args finalAttrs // {
postInstall = ''
install -Dm0644 README.md resources/default-config.kdl -t $doc/share/doc/niri
mv docs/wiki $doc/share/doc/niri/wiki
cp -r . $out
'';
});
};
});
};
};
}