This commit is contained in:
EdenQwQ 2025-03-25 10:51:51 +08:00
parent 027507721d
commit 74ad04dd14
3 changed files with 79 additions and 0 deletions

View file

@ -3,5 +3,6 @@
home.packages = with pkgs; [
pspp
zotero
fiz
];
}

View file

@ -7,4 +7,5 @@
kose-font = pkgs.callPackage ./fonts/kose.nix { };
hugmetight-font = pkgs.callPackage ./fonts/hugmetight.nix { };
custom-colorschemes = pkgs.callPackage ./customColorSchemes { };
fiz = pkgs.callPackage ./fiz.nix { };
}

77
pkgs/fiz.nix Normal file
View file

@ -0,0 +1,77 @@
{
lib,
stdenv,
rustPlatform,
fetchNpmDeps,
cargo-tauri,
copyDesktopItems,
glib-networking,
nodejs,
npmHooks,
openssl,
pkg-config,
webkitgtk_4_1,
wrapGAppsHook4,
fetchFromGitHub,
jq,
moreutils,
}:
rustPlatform.buildRustPackage rec {
pname = "fiz";
version = "0.3.5";
src = fetchFromGitHub {
owner = "CrazySpottedDove";
repo = "fiz";
rev = "cae430f74ebaafe9167e7a8698540179162e5d87";
hash = "sha256-8Fyvy52KQyG8+kf9BGUQ2zyM6+iUFKaOfL9h15QBKOk=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-1ERKMENPMTn5CPK4d5uTZ18ONMrCEY2PIK1GqSGHnSg=";
npmDeps = fetchNpmDeps {
name = "${pname}-npm-deps-${version}";
inherit src;
hash = "sha256-jSgBrMPDmC98bcG44s0npA0Gu0mG8/qbJ3X3wNIHSY8=";
};
nativeBuildInputs = [
cargo-tauri.hook
nodejs
npmHooks.npmConfigHook
pkg-config
wrapGAppsHook4
copyDesktopItems
jq
moreutils
];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [
glib-networking
webkitgtk_4_1
];
cargoRoot = "src-tauri";
buildAndTestSubdir = cargoRoot;
postPatch = ''
jq \
'.bundle.createUpdaterArtifacts = false' \
src-tauri/tauri.conf.json \
| sponge src-tauri/tauri.conf.json
'';
meta = {
homepage = "https://github.com/CrazySpottedDove/fiz";
changelog = "https://github.com/CrazySpottedDove/fiz/releases/tag/app-v${version}";
description = "";
mainProgram = "fiz";
license = lib.licenses.mit;
};
}