working flake
This commit is contained in:
parent
0ff6a2dff8
commit
1402bea078
3 changed files with 30 additions and 33 deletions
|
|
@ -1 +0,0 @@
|
|||
/nix/store/dmyhdba7npfby7kzkg4h8w1k5xk4a6w0-source
|
||||
1
.direnv/flake-inputs/kcr4344gjcn3bapm00x8mj1lcbq5ad0d-source
Symbolic link
1
.direnv/flake-inputs/kcr4344gjcn3bapm00x8mj1lcbq5ad0d-source
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/nix/store/kcr4344gjcn3bapm00x8mj1lcbq5ad0d-source
|
||||
61
flake.nix
61
flake.nix
|
|
@ -18,6 +18,30 @@
|
|||
cargo = rustToolchain;
|
||||
rustc = rustToolchain;
|
||||
};
|
||||
runtimeLibs = with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
glib
|
||||
vulkan-loader
|
||||
mesa
|
||||
libGL
|
||||
];
|
||||
buildLibs = with pkgs; [
|
||||
libqalculate
|
||||
glib
|
||||
];
|
||||
nativeTools = with pkgs; [
|
||||
pkg-config
|
||||
gcc
|
||||
makeWrapper
|
||||
];
|
||||
devTools = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
rustToolchain
|
||||
evcxr
|
||||
pkg-config
|
||||
];
|
||||
in {
|
||||
packages."${system}" = {
|
||||
default = rustPlatform.buildRustPackage {
|
||||
|
|
@ -25,46 +49,19 @@
|
|||
version = "0.1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
gcc
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libqalculate
|
||||
];
|
||||
|
||||
nativeBuildInputs = nativeTools;
|
||||
buildInputs = buildLibs;
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/floating-calculator \
|
||||
--set LD_LIBRARY_PATH ${pkgs.lib.makeLibraryPath [pkgs.wayland pkgs.libxkbcommon]}
|
||||
--set LD_LIBRARY_PATH ${pkgs.lib.makeLibraryPath runtimeLibs}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
devShells."${system}" = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
rustToolchain
|
||||
evcxr
|
||||
pkg-config
|
||||
libqalculate
|
||||
glib
|
||||
];
|
||||
|
||||
buildInputs = devTools ++ buildLibs;
|
||||
VK_ICD_FILENAMES = "${pkgs.mesa}/share/vulkan/icd.d/intel_icd.x86_64.json";
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
glib
|
||||
vulkan-loader
|
||||
mesa
|
||||
libGL
|
||||
]);
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath runtimeLibs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue