forge
Explore
Log in

Don't you dare go Hollow

fix `cargo run` on nixos

Browse files at this commit

dd919fe01b7d235c8e23660732bf24aa4629c8b5sodibooParent: f86a9be
this boils down to adding some extra dependencies to the shell
environment. they're also inherited from craneArgs because the ones from
the package are actually transformed into the WRONG outputs of the
packages. also refactors to use craneLib.devShell because it's somewhat
cleaner.
flake.lockmodified+6 -6
@@ -7,11 +7,11 @@
77 ]
88 },
99 "locked": {
10- "lastModified": 1722960479,
11- "narHash": "sha256-NhCkJJQhD5GUib8zN9JrmYGMwt4lCRp6ZVNzIiYCl0Y=",
10+ "lastModified": 1724533099,
11+ "narHash": "sha256-ZIDtvVQHoCkNoBlLUB3wmqbqCb0Es3DfdUGeDI/58aY=",
1212 "owner": "ipetkov",
1313 "repo": "crane",
14- "rev": "4c6c77920b8d44cd6660c1621dea6b3fc4b4c4f4",
14+ "rev": "7543c8d76f91b8844e0f3b3cc347a72d8fb4b49e",
1515 "type": "github"
1616 },
1717 "original": {
@@ -77,11 +77,11 @@
7777 },
7878 "nixpkgs": {
7979 "locked": {
80- "lastModified": 1723572004,
81- "narHash": "sha256-U5gKtbKuPahB02iGeGHFPlKr/HqrvSsHlEDEXoVyaPc=",
80+ "lastModified": 1724395761,
81+ "narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=",
8282 "owner": "NixOS",
8383 "repo": "nixpkgs",
84- "rev": "19674872444bb3e0768249e724d99c8649c3bd78",
84+ "rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c",
8585 "type": "github"
8686 },
8787 "original": {
flake.nixmodified+10 -18
@@ -42,9 +42,9 @@
4242 src = nixpkgs.lib.cleanSourceWith {
4343 src = craneLib.path ./.;
4444 filter = path: type:
45- (builtins.match "resources" path == null) ||
46- ((craneLib.filterCargoSources path type) &&
47- (builtins.match "niri-visual-tests" path == null));
45+ (builtins.match "resources" path == null)
46+ || ((craneLib.filterCargoSources path type)
47+ && (builtins.match "niri-visual-tests" path == null));
4848 };
4949
5050 nativeBuildInputs = with pkgs; [
@@ -68,6 +68,9 @@
6868 stdenv.cc.cc.lib
6969 pipewire
7070 pango
71+ cairo
72+ glib
73+ pixman
7174 ];
7275
7376 runtimeDependencies = with pkgs; [
@@ -91,22 +94,11 @@
9194 checks.niri = niri;
9295 packages.default = niri;
9396
94- devShells.default = pkgs.mkShell.override {stdenv = pkgs.clangStdenv;} rec {
95- inherit (niri) LIBCLANG_PATH;
96- packages = niri.runtimeDependencies ++ niri.nativeBuildInputs ++ niri.buildInputs;
97-
98- # Force linking to libEGL, which is always dlopen()ed, and to
99- # libwayland-client, which is always dlopen()ed except by the
100- # obscure winit backend.
101- RUSTFLAGS = map (a: "-C link-arg=${a}") [
102- "-Wl,--push-state,--no-as-needed"
103- "-lEGL"
104- "-lwayland-client"
105- "-Wl,--pop-state"
106- ];
97+ devShells.default = craneLib.devShell {
98+ inputsFrom = [niri];
10799
108- LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath packages;
109- PKG_CONFIG_PATH = pkgs.lib.makeLibraryPath packages;
100+ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (craneArgs.runtimeDependencies ++ craneArgs.nativeBuildInputs ++ craneArgs.buildInputs);
101+ inherit (niri) LIBCLANG_PATH;
110102 };
111103 }
112104 );