fix(pkgs): improve versioning
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-08-04 13:52:41 -04:00
parent cf4cfa8b6a
commit c91c8e703e
6 changed files with 62 additions and 48 deletions

View file

@ -12,7 +12,6 @@
libratbag = pkgs.callPackage ./libratbag { libratbag = pkgs.callPackage ./libratbag {
inherit (inputs) libratbag-src; inherit (inputs) libratbag-src;
inherit mkVersion;
}; };
pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack { pam-fprint-grosshack = pkgs.callPackage ./pam-fprint-grosshack {
@ -21,7 +20,6 @@
piper = pkgs.callPackage ./piper { piper = pkgs.callPackage ./piper {
inherit (inputs) piper-src; inherit (inputs) piper-src;
inherit mkVersion;
}; };
pokemon-colorscripts = pkgs.callPackage ./pokemon-colorscripts { pokemon-colorscripts = pkgs.callPackage ./pokemon-colorscripts {

View file

@ -1,9 +1,9 @@
{ {
lib,
gpu-screen-recorder-src,
addOpenGLRunpath, addOpenGLRunpath,
dbus, dbus,
ffmpeg, ffmpeg,
gpu-screen-recorder-src,
lib,
libdrm, libdrm,
libglvnd, libglvnd,
libpulseaudio, libpulseaudio,

View file

@ -1,11 +1,15 @@
{ {
libratbag, lib,
libratbag-src, libratbag-src,
mkVersion, libratbag,
... ...
}: }: let
libratbag.overrideAttrs { inherit (lib) elemAt match readFile splitString;
releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version : '" (readFile "${libratbag-src}/meson.build")) 1)) 0;
in
libratbag.overrideAttrs {
pname = "libratbag"; pname = "libratbag";
version = mkVersion libratbag-src; version = "${releaseVer}+${libratbag-src.shortRev}";
src = libratbag-src; src = libratbag-src;
} }

View file

@ -1,16 +1,16 @@
{ {
stdenv, pam-fprint-grosshack-src,
meson, dbus,
ninja,
pkg-config,
glib, glib,
libfprint, libfprint,
polkit,
dbus,
systemd,
pam,
libpam-wrapper, libpam-wrapper,
pam-fprint-grosshack-src, meson,
ninja,
pam,
pkg-config,
polkit,
stdenv,
systemd,
... ...
}: let }: let
inherit (builtins) elemAt head readFile split; inherit (builtins) elemAt head readFile split;

View file

@ -1,15 +1,22 @@
{ {
mkVersion, lib,
piper,
piper-src, piper-src,
piper,
... ...
}: }: let
piper.overrideAttrs { inherit (lib) elemAt match readFile splitString;
releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version: '" (readFile "${piper-src}/meson.build")) 1)) 0;
in
piper.overrideAttrs rec {
pname = "piper"; pname = "piper";
version = mkVersion piper-src; version = "${releaseVer}+${piper-src.shortRev}";
name = "${pname}-${version}";
src = piper-src; src = piper-src;
mesonFlags = [ mesonFlags = [
"-Druntime-dependency-checks=false" "-Druntime-dependency-checks=false"
]; ];
} }

View file

@ -1,9 +1,14 @@
{ {
lib,
proton-ge-bin, proton-ge-bin,
rsync, rsync,
... ...
}: }: let
proton-ge-bin.overrideAttrs { inherit (lib) elemAt match replaceStrings;
in
proton-ge-bin.overrideAttrs (o: {
version = replaceStrings ["-"] ["."] (elemAt (match "^[^0-9]*(.*)" o.version) 0);
buildInputs = [rsync]; buildInputs = [rsync];
buildCommand = buildCommand =
@ -22,4 +27,4 @@ proton-ge-bin.overrideAttrs {
runHook postBuild runHook postBuild
''; '';
} })