slimserver: add updatescript, move to by-name
This commit is contained in:
parent
83b32addf2
commit
b6cb26876d
@ -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,10 +142,14 @@ perlPackages.buildPerlPackage rec {
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
passthru.tests = {
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests) slimserver;
|
||||
};
|
||||
|
||||
updateScript = ./update.nu;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Logitech/slimserver";
|
||||
changelog = "https://github.com/Logitech/slimserver/blob/${version}/Changelog${lib.versions.major version}.html";
|
14
pkgs/by-name/sl/slimserver/update.nu
Executable file
14
pkgs/by-name/sl/slimserver/update.nu
Executable 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"
|
||||
}
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user