slimserver: add updatescript, move to by-name

This commit is contained in:
Adam Stephens 2024-03-20 08:50:47 -04:00
parent 83b32addf2
commit b6cb26876d
No known key found for this signature in database
3 changed files with 21 additions and 7 deletions

View File

@ -6,7 +6,7 @@
, makeWrapper
, monkeysAudio
, nixosTests
, perl538Packages
, perlPackages
, sox
, stdenv
, wavpack
@ -15,8 +15,6 @@
}:
let
perlPackages = perl538Packages;
binPath = lib.makeBinPath ([ lame flac faad2 sox wavpack ] ++ (lib.optional stdenv.isLinux monkeysAudio));
libPath = lib.makeLibraryPath [ zlib stdenv.cc.cc.lib ];
in
@ -144,8 +142,12 @@ perlPackages.buildPerlPackage rec {
outputs = [ "out" ];
passthru.tests = {
inherit (nixosTests) slimserver;
passthru = {
tests = {
inherit (nixosTests) slimserver;
};
updateScript = ./update.nu;
};
meta = with lib; {

View File

@ -0,0 +1,14 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell common-updater-scripts
# get latest tag, but drop versions 10.0 tags since they are 10+ years old
let latest_tag = list-git-tags --url=https://github.com/logitech/slimserver | lines | find --invert 10.0 | sort --natural | last
let current_version = nix eval --raw -f default.nix slimserver | str trim
if $latest_tag != $current_version {
update-source-version slimserver $latest_tag $"--file=(pwd)/pkgs/by-name/sl/slimserver/package.nix"
{before: $current_version, after: $latest_tag}
} else {
"No new version"
}

View File

@ -26953,8 +26953,6 @@ with pkgs;
sipwitch = callPackage ../servers/sip/sipwitch { };
slimserver = callPackage ../servers/slimserver { };
smcroute = callPackage ../servers/smcroute { };
snipe-it = callPackage ../by-name/sn/snipe-it/package.nix {