mirror of
https://github.com/JaxTheWolf/nixos.git
synced 2026-04-01 02:00:22 +02:00
Use krokiet instead of czkawka
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
{
|
||||
description = "Czkawka (Master) - Built with Naersk";
|
||||
description = "Krokiet (Czkawka Slint GUI)";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
czkawka-src = {
|
||||
url = "github:qarmin/czkawka/9.0.0";
|
||||
url = "github:qarmin/czkawka";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Naersk: Builds Rust crates without needing a manual cargoHash
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -30,39 +27,56 @@
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
gobject-introspection
|
||||
cmake
|
||||
makeWrapper
|
||||
cargo
|
||||
rustc
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
glib
|
||||
gtk4
|
||||
cairo
|
||||
pango
|
||||
gdk-pixbuf
|
||||
atk
|
||||
libadwaita
|
||||
runtimeLibs = with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
libglvnd
|
||||
fontconfig
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
packages.${system}.default = naersk-lib.buildPackage {
|
||||
pname = "czkawka";
|
||||
pname = "krokiet";
|
||||
version = "master";
|
||||
src = czkawka-src;
|
||||
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
nativeBuildInputs = nativeBuildInputs;
|
||||
buildInputs = runtimeLibs;
|
||||
|
||||
cargoBuildOptions =
|
||||
x:
|
||||
x
|
||||
++ [
|
||||
"-p"
|
||||
"krokiet"
|
||||
];
|
||||
|
||||
buildAndCheckFeatures = [
|
||||
"winit_wayland"
|
||||
"winit_x11"
|
||||
];
|
||||
|
||||
RUSTFLAGS = "-C target-cpu=native";
|
||||
NIX_CFLAGS_COMPILE = "-march=native -mtune=native";
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
|
||||
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka.svg
|
||||
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/com.github.qarmin.czkawka-symbolic.svg
|
||||
install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
|
||||
wrapProgram $out/bin/krokiet \
|
||||
--prefix LD_LIBRARY_PATH : ${pkgs.lib.makeLibraryPath runtimeLibs}
|
||||
|
||||
install -Dm444 -t $out/share/applications data/io.github.qarmin.czkawka.krokiet.desktop
|
||||
install -Dm444 -t $out/share/icons/hicolor/scalable/apps data/icons/io.github.qarmin.czkawka.krokiet.svg
|
||||
install -Dm444 -t $out/share/metainfo data/io.github.qarmin.czkawka.krokiet.metainfo.xml
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user