Skip to content

Commit

Permalink
Merge pull request #95 from MalpenZibo/fix-nix-flake
Browse files Browse the repository at this point in the history
Fix nix flake on non NixOS system
  • Loading branch information
MalpenZibo authored Jan 28, 2025
2 parents 6e81713 + 980c9bc commit 018f6a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
mesa.drivers
vulkan-loader
libGL
libglvnd
];

ldLibraryPath = pkgs.lib.makeLibraryPath runtimeDependencies;
in
{
# `nix build` and `nix run`
Expand All @@ -55,14 +58,18 @@
autoPatchelfHook # Add runtimeDependencies to rpath
];

inherit buildInputs runtimeDependencies;
inherit buildInputs runtimeDependencies ldLibraryPath;

postInstall = ''
wrapProgram "$out/bin/ashell" --prefix LD_LIBRARY_PATH : "${ldLibraryPath}"
'';
};

# `nix develop`
devShells.default = pkgs.mkShell {
inherit buildInputs;
inherit buildInputs ldLibraryPath;

LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath runtimeDependencies;
LD_LIBRARY_PATH = ldLibraryPath;
};
}
);
Expand Down

0 comments on commit 018f6a2

Please sign in to comment.