add package for 'biri', a fork of niri with PRs merged

This commit is contained in:
greyweather committed 2026-09-03 14:05:42 +01:00
1 parent a5d0f522da
commit f9e9f7e817
7 files changed
+164 -1

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
{ inputs, self, ... }: {
perSystem = { system, ... }: let
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(final: prev: {
libdisplay-info = inputs.nixpkgs-26-05.legacyPackages.${system}.libdisplay-info;
})
];
config = { };
};
in {
devShells.niri = with pkgs; mkShell {
name = "niri-dev-shell";
strictDeps = true;
buildInputs = with pkgs; [
llvmPackages_latest.llvm
glib
libsysprof-capture
pcre2
libffi
util-linux
selinuxPackages.libselinux
pipewire
systemd
seatd
pango
libdisplay-info
libinput
libxkbcommon
libglvnd
libgbm
wayland
dbus
];
nativeBuildInputs = [
rustc
cargo
pkg-config
rustPlatform.bindgenHook
];
env = {
# Force linking with libEGL and libwayland-client
# so they can be discovered by `dlopen()`
RUSTFLAGS = toString (
map (arg: "-C link-arg=" + arg) [
"-Wl,--push-state,--no-as-needed"
"-lEGL"
"-lwayland-client"
"-Wl,--pop-state"
]
);
# Upstream recommends setting the commit hash manually when in a
# build environment where the Git repository is unavailable.
# See https://github.com/niri-wm/niri/wiki/Packaging-niri#version-string
NIRI_BUILD_COMMIT = "barrulus/biri";
};
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{ inputs, self, ... }: {
perSystem = { pkgs, ... }: {
devShells.rust = with pkgs; mkShell {
name = "rust-dev-shell";
strictDeps = true;
nativeBuildInputs = [
rustc
cargo
pkg-config
rustPlatform.bindgenHook
];
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
};
};
}
+16 -1
View File
@@ -17,11 +17,25 @@
];
info = {
rootPath = "/home/grey/flake";
userName = "grey";
hostName = "takamaki";
rootPath = "/home/grey/flake";
stateVersion = "26.11";
};
programs.sftpman = {
enable = true;
mounts = {
sakamoto = {
host = "sakamoto";
mountDestPath = "/home/grey/mounts/ssh/sakamoto";
mountPoint = "/";
sshKey = "/home/grey/.ssh/id_sakamoto";
user = "grey";
};
};
};
services.gpg-agent = {
enable = true;
extraConfig = ''
@@ -71,6 +85,7 @@
extraPackages = with pkgs; [
nix-init
github-desktop
self.packages.${stdenv.hostPlatform.system}.biri
];
shellScripts = let
+40
View File
@@ -0,0 +1,40 @@
{ 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
'';
});
};
});
};
};
}