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;
|
cargo = rustToolchain;
|
||||||
rustc = 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 {
|
in {
|
||||||
packages."${system}" = {
|
packages."${system}" = {
|
||||||
default = rustPlatform.buildRustPackage {
|
default = rustPlatform.buildRustPackage {
|
||||||
|
|
@ -25,46 +49,19 @@
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
nativeBuildInputs = nativeTools;
|
||||||
nativeBuildInputs = with pkgs; [
|
buildInputs = buildLibs;
|
||||||
pkg-config
|
|
||||||
gcc
|
|
||||||
makeWrapper
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
libqalculate
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/floating-calculator \
|
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}" = {
|
devShells."${system}" = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = devTools ++ buildLibs;
|
||||||
gcc
|
|
||||||
gnumake
|
|
||||||
rustToolchain
|
|
||||||
evcxr
|
|
||||||
pkg-config
|
|
||||||
libqalculate
|
|
||||||
glib
|
|
||||||
];
|
|
||||||
|
|
||||||
VK_ICD_FILENAMES = "${pkgs.mesa}/share/vulkan/icd.d/intel_icd.x86_64.json";
|
VK_ICD_FILENAMES = "${pkgs.mesa}/share/vulkan/icd.d/intel_icd.x86_64.json";
|
||||||
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath runtimeLibs;
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
|
|
||||||
wayland
|
|
||||||
libxkbcommon
|
|
||||||
glib
|
|
||||||
vulkan-loader
|
|
||||||
mesa
|
|
||||||
libGL
|
|
||||||
]);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue