_7zz: 26.0.1 -> 26.0.2; _7zz-rar: move to pkgs/by-name (#543354)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
_7zz,
|
||||
}:
|
||||
_7zz.override {
|
||||
enableUnfree = true;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchzip,
|
||||
fetchFromGitHub,
|
||||
_experimental-update-script-combinators,
|
||||
nix-update-script,
|
||||
|
||||
# Free MASM-compatible assembler
|
||||
asmc-linux,
|
||||
@@ -43,17 +45,17 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "7zz";
|
||||
version = "26.01";
|
||||
version = "26.02";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://7-zip.org/a/7z${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}-src.tar.xz";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ip7z";
|
||||
repo = "7zip";
|
||||
tag = finalAttrs.version;
|
||||
hash =
|
||||
{
|
||||
free = "sha256-52+Gg66MOFmwYUVB0OO4PAtZJtQOkoVpxV7F9xBGy58=";
|
||||
unfree = "sha256-w0fk8EDusUYiOfrmIiUq+xevlwfQxMhjdPzfkHkOkR8=";
|
||||
}
|
||||
.${if enableUnfree then "unfree" else "free"};
|
||||
stripRoot = false;
|
||||
if enableUnfree then
|
||||
"sha256-MmnsCM4guQ5DuWDE5MslI8QIIbkUtZnddVPgAuCRWQU="
|
||||
else
|
||||
"sha256-prKxsT7y7iHbzduM+xqz1yQMEbJ8IjnsmafzC2mOwr4=";
|
||||
# remove the unRAR related code from the src drv
|
||||
# > the license requires that you agree to these use restrictions,
|
||||
# > or you must remove the software (source and binary) from your hard disks
|
||||
@@ -138,7 +140,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
updateScript = _experimental-update-script-combinators.sequence [
|
||||
(nix-update-script {
|
||||
attrPath = "_7zz";
|
||||
extraArgs = [ "--use-github-releases" ];
|
||||
})
|
||||
(nix-update-script {
|
||||
attrPath = "_7zz-rar";
|
||||
extraArgs = [ "--version=skip" ];
|
||||
})
|
||||
];
|
||||
tests.version = testers.testVersion {
|
||||
package = finalAttrs.finalPackage;
|
||||
command = "7zz --help";
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -I nixpkgs=./. -i bash -p curl xq-xml common-updater-scripts
|
||||
set -euo pipefail
|
||||
|
||||
OLD_VERSION="$(nix-instantiate --eval --json --expr 'let pkgs = import ./. {}; in pkgs._7zz.version' | sed 's/"//g')"
|
||||
NEW_VERSION="$(curl -H 'Accept: application/rss+xml' 'https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip' | xq -x "substring((/rss/channel/item[link[contains(., 'src.tar.xz')]])[1]/title, 8, 5)")"
|
||||
|
||||
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
|
||||
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
||||
echo "Already up to date! Doing nothing"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
update-source-version _7zz "$NEW_VERSION"
|
||||
update-source-version _7zz-rar "$NEW_VERSION" --ignore-same-version
|
||||
@@ -937,8 +937,6 @@ with pkgs;
|
||||
|
||||
### TOOLS
|
||||
|
||||
_7zz-rar = _7zz.override { enableUnfree = true; };
|
||||
|
||||
acquire = with python3Packages; toPythonApplication acquire;
|
||||
|
||||
actdiag = with python3.pkgs; toPythonApplication actdiag;
|
||||
|
||||
Reference in New Issue
Block a user