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;
pname = "libratbag";
version = mkVersion libratbag-src; releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version : '" (readFile "${libratbag-src}/meson.build")) 1)) 0;
src = libratbag-src; in
} libratbag.overrideAttrs {
pname = "libratbag";
version = "${releaseVer}+${libratbag-src.shortRev}";
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;
pname = "piper";
version = mkVersion piper-src;
src = piper-src;
mesonFlags = [ releaseVer = elemAt (match "^([^']*).*" (elemAt (splitString "version: '" (readFile "${piper-src}/meson.build")) 1)) 0;
"-Druntime-dependency-checks=false" in
]; piper.overrideAttrs rec {
} pname = "piper";
version = "${releaseVer}+${piper-src.shortRev}";
name = "${pname}-${version}";
src = piper-src;
mesonFlags = [
"-Druntime-dependency-checks=false"
];
}

View file

@ -1,25 +1,30 @@
{ {
lib,
proton-ge-bin, proton-ge-bin,
rsync, rsync,
... ...
}: }: let
proton-ge-bin.overrideAttrs { inherit (lib) elemAt match replaceStrings;
buildInputs = [rsync]; in
proton-ge-bin.overrideAttrs (o: {
version = replaceStrings ["-"] ["."] (elemAt (match "^[^0-9]*(.*)" o.version) 0);
buildCommand = buildInputs = [rsync];
# bash
''
runHook preBuild
echo "Proton should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out buildCommand =
# bash
''
runHook preBuild
cat $src/compatibilitytool.vdf > ./compatibilitytool.vdf echo "Proton should not be installed into environments. Please use programs.steam.extraCompatPackages instead." > $out
sed -i 's/"GE-Proton[^"]*"/"GE-Proton-Latest"/g' ./compatibilitytool.vdf
mkdir $steamcompattool cat $src/compatibilitytool.vdf > ./compatibilitytool.vdf
cp -a ./compatibilitytool.vdf $steamcompattool/ sed -i 's/"GE-Proton[^"]*"/"GE-Proton-Latest"/g' ./compatibilitytool.vdf
rsync -ar --exclude='compatibilitytool.vdf' $src/* $steamcompattool/
runHook postBuild mkdir $steamcompattool
''; cp -a ./compatibilitytool.vdf $steamcompattool/
} rsync -ar --exclude='compatibilitytool.vdf' $src/* $steamcompattool/
runHook postBuild
'';
})