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

View file

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

View file

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

View file

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

View file

@ -1,15 +1,22 @@
{
mkVersion,
piper,
lib,
piper-src,
piper,
...
}:
piper.overrideAttrs {
}: let
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";
version = mkVersion piper-src;
version = "${releaseVer}+${piper-src.shortRev}";
name = "${pname}-${version}";
src = piper-src;
mesonFlags = [
"-Druntime-dependency-checks=false"
];
}
}

View file

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