chore: clean up some packaging code

This commit is contained in:
matt1432 2025-03-22 16:02:57 -04:00
parent 6b3a78c5cf
commit 8720d95e76
7 changed files with 35 additions and 26 deletions
configurations/nos/modules/comics/jdownloader2
packages

View file

@ -12,6 +12,7 @@
USER_ID = toString config.users.users.${mainUser}.uid; USER_ID = toString config.users.users.${mainUser}.uid;
GROUP_ID = toString config.users.users.${mainUser}.uid; GROUP_ID = toString config.users.users.${mainUser}.uid;
KEEP_APP_RUNNING = 1; KEEP_APP_RUNNING = 1;
DARK_MODE = 1;
TZ = "America/New_York"; TZ = "America/New_York";
}; };

View file

@ -1,6 +1,8 @@
{ {
fcft, # nix build inputs
fetchFromGitea, fetchFromGitea,
# deps
fcft,
... ...
}: }:
fcft.overrideAttrs (o: rec { fcft.overrideAttrs (o: rec {

View file

@ -1,6 +1,4 @@
{ {
# params
enableLocalIcons ? true,
# nix build inputs # nix build inputs
lib, lib,
stdenv, stdenv,
@ -10,6 +8,8 @@
# deps # deps
nodejs, nodejs,
pnpm, pnpm,
# params
enableLocalIcons ? true,
... ...
}: let }: let
inherit (lib) getExe optionalString; inherit (lib) getExe optionalString;

View file

@ -1,8 +1,10 @@
{ {
# nix build inputs
lib, lib,
stdenv, stdenv,
fetchurl, fetchurl,
makeWrapper, makeWrapper,
# deps
jre, jre,
... ...
}: let }: let
@ -43,7 +45,7 @@ in
homepage = "https://github.com/Snd-R/komf"; homepage = "https://github.com/Snd-R/komf";
sourceProvenance = with lib.sourceTypes; [binaryBytecode]; sourceProvenance = with lib.sourceTypes; [binaryBytecode];
description = '' description = ''
komf is a tool that fetches metadata and thumbnails for your digital comic book library. Komf is a tool that fetches metadata and thumbnails for your digital comic book library.
''; '';
}; };
} }

View file

@ -1,10 +1,10 @@
{ {
# nix build inputs
lib, lib,
rustPlatform, rustPlatform,
fetchFromGitHub, fetchFromGitHub,
... ...
}: }: let
rustPlatform.buildRustPackage rec {
pname = "nbted"; pname = "nbted";
version = "1.5.0"; version = "1.5.0";
@ -14,26 +14,29 @@ rustPlatform.buildRustPackage rec {
tag = version; tag = version;
hash = "sha256-5gCxTFjI3WDC9+F9i4I2g17+wHWnQHjC4Hurj5CMhB4="; hash = "sha256-5gCxTFjI3WDC9+F9i4I2g17+wHWnQHjC4Hurj5CMhB4=";
}; };
in
rustPlatform.buildRustPackage {
inherit pname src version;
cargoLock.lockFile = "${src}/Cargo.lock"; cargoLock.lockFile = "${src}/Cargo.lock";
env.OUT_DIR = "$out"; env.OUT_DIR = "$out";
patchPhase = '' patchPhase = ''
export OUT_DIR=$(mktemp -d) export OUT_DIR=$(mktemp -d)
rm ./build.rs rm ./build.rs
echo '"${version}"' > $OUT_DIR/git-revision.txt echo '"${version}"' > $OUT_DIR/git-revision.txt
substituteInPlace ./Cargo.toml --replace-fail "build = \"build.rs\"" "" substituteInPlace ./Cargo.toml --replace-fail "build = \"build.rs\"" ""
'';
meta = {
mainProgram = pname;
license = lib.licenses.cc0;
homepage = "https://github.com/C4K3/nbted";
description = ''
Command-line NBT editor written in Rust. It does precisely one thing: convert NBT files to
a pretty text format, and reverse the pretty text format back into NBT.
''; '';
};
} meta = {
mainProgram = pname;
license = lib.licenses.cc0;
homepage = "https://github.com/C4K3/nbted";
description = ''
Command-line NBT editor written in Rust. It does precisely one thing: convert NBT files to
a pretty text format, and reverse the pretty text format back into NBT.
'';
};
}

View file

@ -1,4 +1,5 @@
{ {
# nix build inputs
lib, lib,
pkgs, pkgs,
poetry2nix, poetry2nix,

View file

@ -2,9 +2,9 @@
{ {
# nix build inputs # nix build inputs
lib, lib,
fetchPypi,
# deps
python3Packages, python3Packages,
fetchPypi,
...
}: }:
python3Packages.buildPythonPackage rec { python3Packages.buildPythonPackage rec {
pname = "urllib3"; pname = "urllib3";