refactor(pkgs): improve versioning
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
927a3fbfb1
commit
d17a69372a
29 changed files with 165 additions and 112 deletions
|
@ -1,7 +1,9 @@
|
|||
{pkgs, ...} @ inputs: let
|
||||
trash = pkgs.callPackage ./trash-d.nix inputs;
|
||||
in {
|
||||
home.packages = [trash];
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
home.packages = [self.packages.${pkgs.system}.trash-d];
|
||||
|
||||
programs.bash.shellAliases.rm = "trash";
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
trash-d-src,
|
||||
stdenv,
|
||||
dmd,
|
||||
dub,
|
||||
ronn,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "trash";
|
||||
version = trash-d-src.shortRev;
|
||||
|
||||
src = trash-d-src;
|
||||
|
||||
buildInputs = [dub dmd ronn];
|
||||
|
||||
buildPhase = ''
|
||||
# https://github.com/svanderburg/node2nix/issues/217#issuecomment-751311272
|
||||
export HOME=$(mktemp -d)
|
||||
|
||||
dub build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/man/man1
|
||||
|
||||
cp -a ./build/trash $out/bin/
|
||||
|
||||
ronn --roff --pipe MANUAL.md > $out/man/man1/trash.1
|
||||
'';
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "codeberg.org/forgejo/forgejo";
|
||||
imageDigest = "sha256:7918c661718554aefb5901f2c6336b12a1bed427f2b080ee732ca6cd0324f8fd";
|
||||
sha256 = "0rvncgami6p777qrlnblyxkjyjabk6npgjzq3isxw77gffvxvj9y";
|
||||
imageDigest = "sha256:fd0411ca373739a6513d82887ab44915f5732adbc5c21dfa1e01d4f4779f7e09";
|
||||
sha256 = "0jimix4rq7ic56b1dy61jlv3k7wmc25pjdgv7blhjg81zis21ylc";
|
||||
finalImageName = "codeberg.org/forgejo/forgejo";
|
||||
finalImageTag = "7.0.3";
|
||||
finalImageTag = "7.0.4";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "postgres";
|
||||
imageDigest = "sha256:da8b991e3909fc95a272fcbeb1e0d79ce1a7028fe1549b1ba0ed0a6a45e126cb";
|
||||
sha256 = "1mkskwa4s7j86qj42b7sgdjp9s3c838i3i5lmba0l69pdmgygs3m";
|
||||
imageDigest = "sha256:92e5719074c63b2d30bc8eff29c7f18785a5a5cef01a87dc9e725080747fc57b";
|
||||
sha256 = "10ld7pda7svs35939lmch0shc1rjdmrsksiv247656m67yyp1g3j";
|
||||
finalImageName = "postgres";
|
||||
finalImageTag = "14";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "postgres";
|
||||
imageDigest = "sha256:da8b991e3909fc95a272fcbeb1e0d79ce1a7028fe1549b1ba0ed0a6a45e126cb";
|
||||
sha256 = "1mkskwa4s7j86qj42b7sgdjp9s3c838i3i5lmba0l69pdmgygs3m";
|
||||
imageDigest = "sha256:92e5719074c63b2d30bc8eff29c7f18785a5a5cef01a87dc9e725080747fc57b";
|
||||
sha256 = "10ld7pda7svs35939lmch0shc1rjdmrsksiv247656m67yyp1g3j";
|
||||
finalImageName = "postgres";
|
||||
finalImageTag = "14";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "rssbridge/rss-bridge";
|
||||
imageDigest = "sha256:f64dc2fa2c81c0930a447cd937e965d7bb6443c4f09883375f60c28ddb7d1883";
|
||||
sha256 = "0shdpj2whs0a8k4537a7gpdsf1v7iwbh8hvcj3vz25wfm4dvrg79";
|
||||
imageDigest = "sha256:e1040b00324d3b3e660beefe91f21d8fd632fb338a11150ae9ec482b9bcd33fe";
|
||||
sha256 = "1ffwzrmxhlhhm4vgypv24j716l1wyr6nn4iz2icc1g2a0ywzi0bi";
|
||||
finalImageName = "rssbridge/rss-bridge";
|
||||
finalImageTag = "latest";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "ghcr.io/immich-app/immich-machine-learning";
|
||||
imageDigest = "sha256:ea112b507c71c32815f1c02782e20a2f5e8dc42d3ea1177b4fed4f25fce4c9d5";
|
||||
sha256 = "05xl2gakjxi60y3b4vgzxmrsrxix9hp12pc2yjsrmq2i93dhypsk";
|
||||
imageDigest = "sha256:9db20e5c2033bef01fa2be50fa0a2c3d62e43f069aedde4d49a65e65a436d40b";
|
||||
sha256 = "01cchdlp322nbw0rs6akcx569wbqf1lydwvq6zw9lpwkhrsyrrvx";
|
||||
finalImageName = "ghcr.io/immich-app/immich-machine-learning";
|
||||
finalImageTag = "v1.106.3";
|
||||
finalImageTag = "v1.106.4";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "ghcr.io/immich-app/immich-server";
|
||||
imageDigest = "sha256:80b9e59c55869ec3f4cfa204ce1ad096356252b834b5cc2b6421dff69aaa2e8a";
|
||||
sha256 = "0k7qwk02r92kq852j4zw8i4kjczldpkkcw5iqmn0dk3r1zzy9n2y";
|
||||
imageDigest = "sha256:d39cb7ecbcc9924f2c51a3e0deb8a469075996c6ba9e1384eb2ddb550984848e";
|
||||
sha256 = "0ynfw50bga8av98mbnnznm9ih3lar9xim7njby8vwbs455iiz6g4";
|
||||
finalImageName = "ghcr.io/immich-app/immich-server";
|
||||
finalImageTag = "v1.106.3";
|
||||
finalImageTag = "v1.106.4";
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "ghcr.io/fallenbagel/jellyseerr";
|
||||
imageDigest = "sha256:e82b4c83bd453916c38ba7a9df8e7d324d4b696998ac815ed58c93b94b09adc0";
|
||||
sha256 = "0vk8vyqcaplbwp7xm94g91vspbfiwq4k3pp0n1h5jq33qjks1svb";
|
||||
imageDigest = "sha256:e14379fc17d16e902c3d9234425e0da5e4926d3fe1eeb0f1cb4538f4b0618490";
|
||||
sha256 = "1apma6asq7pbka2n7jfxry6qy1bf43lnkwly5s3d93zvq7y1r4wm";
|
||||
finalImageName = "ghcr.io/fallenbagel/jellyseerr";
|
||||
finalImageTag = "develop";
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "nextcloud";
|
||||
imageDigest = "sha256:40a5a898dfbb37a907321b37dfe05f36e6f0f693c9bbbbe420af22906e975a74";
|
||||
imageDigest = "sha256:0bb498026da9fee4c7c703a9ed682aa2aee825a82946c6944a872cbedb44a272";
|
||||
sha256 = "1ahpz4a1pdbg7554ydqzfagra32snd6pc7dv1afq5pwyd03cllr4";
|
||||
finalImageName = "nextcloud";
|
||||
finalImageTag = "29.0.1-fpm";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
pkgs:
|
||||
pkgs.dockerTools.pullImage {
|
||||
imageName = "nginx";
|
||||
imageDigest = "sha256:0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d";
|
||||
sha256 = "159z86nw6riirs9ix4zix7qawhfngl5fkx7ypmi6ib0sfayc8pw2";
|
||||
imageDigest = "sha256:0acaab7c2237e052dc5adf1694ebce0b374063a62b2a1b7f2b3bc9cd3fb8c1ff";
|
||||
sha256 = "099ivwfqsb1d8svj1kxy2bnvr8zwf4sgw4816dkghsb4jqnij270";
|
||||
finalImageName = "nginx";
|
||||
finalImageTag = "latest";
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
gen = import ./vuetorrent.nix;
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "vuetorrent";
|
||||
pname = "vuetorrent";
|
||||
inherit (gen) version;
|
||||
|
||||
nativeBuildInputs = [pkgs.unzip];
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
secrets,
|
||||
...
|
||||
}: let
|
||||
inherit (import ./lib.nix inputs) mkNixOS mkNixOnDroid mkPkgs;
|
||||
inherit (import ./lib.nix inputs) mkVersion mkNixOS mkNixOnDroid mkPkgs;
|
||||
|
||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
||||
|
||||
|
@ -98,12 +98,12 @@
|
|||
legacyPackages = perSystem (system: pkgs: {
|
||||
dracula =
|
||||
pkgs.lib.recurseIntoAttrs
|
||||
(pkgs.callPackage ./pkgs/dracula ({} // inputs));
|
||||
(pkgs.callPackage ./pkgs/dracula ({inherit mkVersion;} // inputs));
|
||||
});
|
||||
|
||||
packages =
|
||||
perSystem (system: pkgs:
|
||||
import ./pkgs ({inherit self system pkgs;} // inputs));
|
||||
import ./pkgs ({inherit self system pkgs mkVersion;} // inputs));
|
||||
|
||||
devShells = perSystem (_: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
2
lib.nix
2
lib.nix
|
@ -6,6 +6,8 @@
|
|||
nixpkgs-wayland,
|
||||
...
|
||||
} @ inputs: rec {
|
||||
mkVersion = src: "0pre+" + src.shortRev;
|
||||
|
||||
# Import pkgs from a nixpkgs
|
||||
mkPkgs = system: input:
|
||||
import input {
|
||||
|
|
|
@ -3,19 +3,23 @@
|
|||
pkgs,
|
||||
piper-src,
|
||||
...
|
||||
}: {
|
||||
} @ inputs: let
|
||||
inherit (import ../lib.nix inputs) mkVersion;
|
||||
in {
|
||||
services.ratbagd = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.libratbag.overrideAttrs {
|
||||
version = libratbag-src.shortRev;
|
||||
pname = "libratbag";
|
||||
version = mkVersion libratbag-src;
|
||||
src = libratbag-src;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.piper.overrideAttrs {
|
||||
name = "piper-${piper-src.shortRev}";
|
||||
pname = "piper";
|
||||
version = mkVersion piper-src;
|
||||
src = piper-src;
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
buildGoModule,
|
||||
curseforge-server-downloader-src,
|
||||
mkVersion,
|
||||
...
|
||||
}:
|
||||
buildGoModule {
|
||||
pname = "curseforge-server-downloader";
|
||||
version = "unstable";
|
||||
version = mkVersion curseforge-server-downloader-src;
|
||||
|
||||
src = curseforge-server-downloader-src;
|
||||
doCheck = false;
|
||||
|
|
|
@ -1,28 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
curseforge-server-downloader-src,
|
||||
gpu-screen-recorder-src,
|
||||
pam-fprint-grosshack-src,
|
||||
pokemon-colorscripts-src,
|
||||
mkVersion,
|
||||
...
|
||||
} @ inputs: {
|
||||
coloryou = pkgs.callPackage ./coloryou {};
|
||||
|
||||
curseforge-server-downloader = pkgs.callPackage ./curseforge-server-downloader {
|
||||
inherit curseforge-server-downloader-src;
|
||||
inherit (inputs) curseforge-server-downloader-src;
|
||||
inherit mkVersion;
|
||||
};
|
||||
|
||||
gpu-screen-recorder = pkgs.callPackage ./gpu-screen-recorder {
|
||||
inherit gpu-screen-recorder-src;
|
||||
inherit (inputs) gpu-screen-recorder-src;
|
||||
};
|
||||
|
||||
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
|
||||
inherit pam-fprint-grosshack-src;
|
||||
inherit (inputs) pam-fprint-grosshack-src;
|
||||
};
|
||||
|
||||
pokemon-colorscripts = pkgs.callPackage ./pokemon-colorscripts {
|
||||
inherit pokemon-colorscripts-src;
|
||||
inherit (inputs) pokemon-colorscripts-src;
|
||||
inherit mkVersion;
|
||||
};
|
||||
|
||||
repl = pkgs.callPackage ./repl {};
|
||||
|
||||
trash-d = pkgs.callPackage ./trash-d {
|
||||
inherit (inputs) trash-d-src;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
bat-theme-src,
|
||||
mkVersion,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-bat";
|
||||
version = bat-theme-src.shortRev;
|
||||
version = mkVersion bat-theme-src;
|
||||
|
||||
src = bat-theme-src;
|
||||
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
{pkgs, ...} @ inputs:
|
||||
pkgs.lib.makeScope pkgs.newScope (drac: {
|
||||
bat = drac.callPackage ./bat.nix {inherit (inputs) bat-theme-src;};
|
||||
git = drac.callPackage ./git.nix {inherit (inputs) git-theme-src;};
|
||||
bat = drac.callPackage ./bat.nix {
|
||||
inherit (inputs) bat-theme-src mkVersion;
|
||||
};
|
||||
|
||||
git = drac.callPackage ./git.nix {
|
||||
inherit (inputs) git-theme-src mkVersion;
|
||||
};
|
||||
|
||||
gtk = import ./gtk.nix {inherit (inputs) gtk-theme-src pkgs;};
|
||||
plymouth = drac.callPackage ./plymouth.nix {inherit (inputs) dracula-plymouth-src;};
|
||||
sioyek = drac.callPackage ./sioyek.nix {inherit (inputs) sioyek-theme-src;};
|
||||
wallpaper = pkgs.fetchurl (import ./wallpaper.nix);
|
||||
|
||||
plymouth = drac.callPackage ./plymouth.nix {
|
||||
inherit (inputs) dracula-plymouth-src mkVersion;
|
||||
};
|
||||
|
||||
sioyek = drac.callPackage ./sioyek.nix {
|
||||
inherit (inputs) sioyek-theme-src mkVersion;
|
||||
};
|
||||
|
||||
wallpaper = drac.callPackage ./wallpaper.nix {};
|
||||
})
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
stdenv,
|
||||
git-theme-src,
|
||||
mkVersion,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-git";
|
||||
version = git-theme-src.shortRev;
|
||||
version = mkVersion git-theme-src;
|
||||
|
||||
src = git-theme-src;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
pkgs.dracula-theme.overrideAttrs {
|
||||
version = gtk-theme-src.shortRev;
|
||||
pkgs.dracula-theme.overrideAttrs (o: {
|
||||
version = o.version + "+" + gtk-theme-src.shortRev;
|
||||
src = gtk-theme-src;
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
stdenv,
|
||||
dracula-plymouth-src,
|
||||
mkVersion,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-plymouth";
|
||||
version = dracula-plymouth-src.shortRev;
|
||||
version = mkVersion dracula-plymouth-src;
|
||||
|
||||
src = dracula-plymouth-src;
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
mkVersion,
|
||||
sioyek-theme-src,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-sioyek";
|
||||
version = sioyek-theme-src.shortRev;
|
||||
version = mkVersion sioyek-theme-src;
|
||||
|
||||
src = sioyek-theme-src;
|
||||
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
{
|
||||
url = "https://raw.githubusercontent.com/aynp/dracula-wallpapers/main/Art/4k/Waves%201.png";
|
||||
hash = "sha256-f9FwSOSvqTeDj4bOjYUQ6TM+/carCD9o5dhg/MnP/lk=";
|
||||
fetchurl,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "dracula-wallpaper";
|
||||
version = "";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/aynp/dracula-wallpapers/main/Art/4k/Waves%201.png";
|
||||
hash = "sha256-f9FwSOSvqTeDj4bOjYUQ6TM+/carCD9o5dhg/MnP/lk=";
|
||||
};
|
||||
|
||||
phases = ["installPhase"];
|
||||
|
||||
installPhase = ''
|
||||
cp $src $out
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
.version;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "gpu-screen-recorder";
|
||||
pname = "gpu-screen-recorder";
|
||||
version = "${tag}+${gpu-screen-recorder-src.shortRev}";
|
||||
|
||||
src = gpu-screen-recorder-src;
|
||||
|
|
|
@ -12,30 +12,33 @@
|
|||
libpam-wrapper,
|
||||
pam-fprint-grosshack-src,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "pam-fprint-grosshack";
|
||||
version = pam-fprint-grosshack-src.shortRev;
|
||||
}: let
|
||||
inherit (builtins) elemAt head readFile split;
|
||||
tag = head (split "'" (elemAt (split " version: '" (readFile "${pam-fprint-grosshack-src}/meson.build")) 2));
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "pam-fprint-grosshack";
|
||||
version = "${tag}+${pam-fprint-grosshack-src.shortRev}";
|
||||
|
||||
src = pam-fprint-grosshack-src;
|
||||
src = pam-fprint-grosshack-src;
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
glib
|
||||
libfprint
|
||||
polkit
|
||||
dbus
|
||||
systemd
|
||||
pam
|
||||
libpam-wrapper
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
glib
|
||||
libfprint
|
||||
polkit
|
||||
dbus
|
||||
systemd
|
||||
pam
|
||||
libpam-wrapper
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dpam_modules_dir=${placeholder "out"}/lib/security"
|
||||
"-Dsysconfdir=${placeholder "out"}/etc"
|
||||
"-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/system-services"
|
||||
"-Dsystemd_system_unit_dir=${placeholder "out"}/lib/systemd/system"
|
||||
];
|
||||
}
|
||||
mesonFlags = [
|
||||
"-Dpam_modules_dir=${placeholder "out"}/lib/security"
|
||||
"-Dsysconfdir=${placeholder "out"}/etc"
|
||||
"-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/system-services"
|
||||
"-Dsystemd_system_unit_dir=${placeholder "out"}/lib/systemd/system"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
mkVersion,
|
||||
stdenv,
|
||||
python3Packages,
|
||||
pokemon-colorscripts-src,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "pokemon-colorscripts";
|
||||
version = pokemon-colorscripts-src.shortRev;
|
||||
pname = "pokemon-colorscripts";
|
||||
version = mkVersion pokemon-colorscripts-src;
|
||||
|
||||
src = pokemon-colorscripts-src;
|
||||
|
||||
|
|
35
pkgs/trash-d/default.nix
Normal file
35
pkgs/trash-d/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
dmd,
|
||||
dub,
|
||||
trash-d-src,
|
||||
ronn,
|
||||
stdenv,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) fromJSON readFile;
|
||||
|
||||
tag = (fromJSON (readFile "${trash-d-src}/dub.json")).version;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "trash";
|
||||
version = "${tag}+${trash-d-src.shortRev}";
|
||||
|
||||
src = trash-d-src;
|
||||
|
||||
buildInputs = [dub dmd ronn];
|
||||
|
||||
buildPhase = ''
|
||||
# https://github.com/svanderburg/node2nix/issues/217#issuecomment-751311272
|
||||
export HOME=$(mktemp -d)
|
||||
|
||||
dub build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/man/man1
|
||||
|
||||
cp -a ./build/trash $out/bin/
|
||||
|
||||
ronn --roff --pipe MANUAL.md > $out/man/man1/trash.1
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue