Files

82 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2025-12-21 12:48:55 +01:00
{
2026-02-01 12:56:42 +01:00
description = "Krokiet (Czkawka Slint GUI)";
2025-12-21 12:48:55 +01:00
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
czkawka-src = {
2026-02-01 12:56:42 +01:00
url = "github:qarmin/czkawka";
2026-01-05 15:16:09 +01:00
flake = false;
2025-12-21 12:48:55 +01:00
};
2026-03-12 00:15:38 +01:00
2025-12-21 12:48:55 +01:00
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2026-03-23 21:24:20 +01:00
outputs = {
self,
nixpkgs,
czkawka-src,
naersk,
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
naersk-lib = pkgs.callPackage naersk {};
2025-12-21 12:48:55 +01:00
2026-03-23 21:24:20 +01:00
nativeBuildInputs = with pkgs; [
cargo
cmake
makeWrapper
pkg-config
rustc
];
2025-12-21 12:48:55 +01:00
2026-03-23 21:24:20 +01:00
runtimeLibs = with pkgs; [
fontconfig
libglvnd
libX11
libXcursor
libXi
libxkbcommon
libXrandr
wayland
];
in {
packages.${system}.default = naersk-lib.buildPackage {
pname = "krokiet";
version = "master";
src = czkawka-src;
2026-02-01 12:56:42 +01:00
2026-03-23 21:24:20 +01:00
nativeBuildInputs = nativeBuildInputs;
buildInputs = runtimeLibs;
2026-02-01 12:56:42 +01:00
2026-03-23 21:24:20 +01:00
cargoBuildOptions = x:
x
++ [
"-p"
"krokiet"
2026-02-01 12:56:42 +01:00
];
2025-12-21 12:48:55 +01:00
2026-03-23 21:24:20 +01:00
buildAndCheckFeatures = [
"winit_wayland"
"winit_x11"
];
RUSTFLAGS = "-C target-cpu=native";
NIX_CFLAGS_COMPILE = "-march=native -mtune=native";
2026-01-05 15:16:09 +01:00
2026-03-23 21:24:20 +01:00
postInstall = ''
wrapProgram $out/bin/krokiet \
--prefix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath runtimeLibs}
2026-02-01 12:56:42 +01:00
2026-03-23 21:24:20 +01:00
install -Dm444 -t $out/share/applications data/io.github.qarmin.krokiet.desktop
2026-02-01 19:47:19 +01:00
2026-03-23 21:24:20 +01:00
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/io.github.qarmin.krokiet.svg \
2026-02-01 19:47:19 +01:00
2026-03-23 21:24:20 +01:00
install -Dm444 -t $out/share/metainfo data/io.github.qarmin.krokiet.metainfo.xml
'';
2025-12-21 12:48:55 +01:00
};
2026-03-23 21:24:20 +01:00
};
2025-12-26 02:35:27 +01:00
}