diff --git a/nixos/modules/services/backup/syncoid.nix b/nixos/modules/services/backup/syncoid.nix index 73b01d4b53fa..3ad8d279a36d 100644 --- a/nixos/modules/services/backup/syncoid.nix +++ b/nixos/modules/services/backup/syncoid.nix @@ -79,6 +79,33 @@ in ''; }; + localSourceAllow = mkOption { + type = types.listOf types.str; + # Permissions snapshot and destroy are in case --no-sync-snap is not used + default = [ "bookmark" "hold" "send" "snapshot" "destroy" ]; + description = '' + Permissions granted for the user + for local source datasets. See + + for available permissions. + ''; + }; + + localTargetAllow = mkOption { + type = types.listOf types.str; + default = [ "change-key" "compression" "create" "mount" "mountpoint" "receive" "rollback" ]; + example = [ "create" "mount" "receive" "rollback" ]; + description = '' + Permissions granted for the user + for local target datasets. See + + for available permissions. + Make sure to include the change-key permission if you send raw encrypted datasets, + the compression permission if you send raw compressed datasets, and so on. + For remote target datasets you'll have to set your remote user permissions by yourself. + ''; + }; + commonArgs = mkOption { type = types.listOf types.str; default = [ ]; @@ -133,6 +160,30 @@ in ''; }; + localSourceAllow = mkOption { + type = types.listOf types.str; + description = '' + Permissions granted for the user + for local source datasets. See + + for available permissions. + Defaults to option. + ''; + }; + + localTargetAllow = mkOption { + type = types.listOf types.str; + description = '' + Permissions granted for the user + for local target datasets. See + + for available permissions. + Make sure to include the change-key permission if you send raw encrypted datasets, + the compression permission if you send raw compressed datasets, and so on. + For remote target datasets you'll have to set your remote user permissions by yourself. + ''; + }; + sendOptions = mkOption { type = types.separatedString " "; default = ""; @@ -179,6 +230,8 @@ in config = { source = mkDefault name; sshKey = mkDefault cfg.sshKey; + localSourceAllow = mkDefault cfg.localSourceAllow; + localTargetAllow = mkDefault cfg.localTargetAllow; }; })); default = { }; @@ -221,13 +274,11 @@ in path = [ "/run/booted-system/sw/bin/" ]; serviceConfig = { ExecStartPre = - # Permissions snapshot and destroy are in case --no-sync-snap is not used - (map (buildAllowCommand "allow" [ "bookmark" "hold" "send" "snapshot" "destroy" ]) (localDatasetName c.source)) ++ - (map (buildAllowCommand "allow" [ "create" "mount" "receive" "rollback" ]) (localDatasetName c.target)); + (map (buildAllowCommand "allow" c.localSourceAllow) (localDatasetName c.source)) ++ + (map (buildAllowCommand "allow" c.localTargetAllow) (localDatasetName c.target)); ExecStopPost = - # Permissions snapshot and destroy are in case --no-sync-snap is not used - (map (buildAllowCommand "unallow" [ "bookmark" "hold" "send" "snapshot" "destroy" ]) (localDatasetName c.source)) ++ - (map (buildAllowCommand "unallow" [ "create" "mount" "receive" "rollback" ]) (localDatasetName c.target)); + (map (buildAllowCommand "unallow" c.localSourceAllow) (localDatasetName c.source)) ++ + (map (buildAllowCommand "unallow" c.localTargetAllow) (localDatasetName c.target)); ExecStart = lib.escapeShellArgs ([ "${pkgs.sanoid}/bin/syncoid" ] ++ optionals c.useCommonArgs cfg.commonArgs ++ optional c.recursive "-r" diff --git a/pkgs/applications/audio/friture/default.nix b/pkgs/applications/audio/friture/default.nix index 99ce726ca177..8383bdbebc67 100644 --- a/pkgs/applications/audio/friture/default.nix +++ b/pkgs/applications/audio/friture/default.nix @@ -4,13 +4,13 @@ let py = python3Packages; in py.buildPythonApplication rec { pname = "friture"; - version = "unstable-2020-02-16"; + version = "0.47"; src = fetchFromGitHub { owner = "tlecomte"; repo = pname; - rev = "4460b4e72a9c55310d6438f294424b5be74fc0aa"; - sha256 = "1pmxzq78ibifby3gbir1ah30mgsqv0y7zladf5qf3sl5r1as0yym"; + rev = "v${version}"; + sha256 = "1qcsvmgdz9hhv5gaa918147wvng6manc4iq8ci6yr761ljqrgwjx"; }; nativeBuildInputs = (with py; [ numpy cython scipy ]) ++ diff --git a/pkgs/applications/audio/friture/factorial.patch b/pkgs/applications/audio/friture/factorial.patch deleted file mode 100644 index de053802932d..000000000000 --- a/pkgs/applications/audio/friture/factorial.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/friture/filter_design.py b/friture/filter_design.py -index 9876c43..1cc749a 100644 ---- a/friture/filter_design.py -+++ b/friture/filter_design.py -@@ -2,7 +2,7 @@ - from numpy import pi, exp, arange, cos, sin, sqrt, zeros, ones, log, arange, set_printoptions - # the three following lines are a workaround for a bug with scipy and py2exe - # together. See http://www.pyinstaller.org/ticket/83 for reference. --from scipy.misc import factorial -+from scipy.special import factorial - import scipy - scipy.factorial = factorial - diff --git a/pkgs/applications/audio/friture/unlock_constraints.patch b/pkgs/applications/audio/friture/unlock_constraints.patch index ab53f948a485..6ee474794b2b 100644 --- a/pkgs/applications/audio/friture/unlock_constraints.patch +++ b/pkgs/applications/audio/friture/unlock_constraints.patch @@ -1,34 +1,34 @@ diff --git a/setup.py b/setup.py -index f31eeec..ac0927b 100644 +index 4092388..6cb7dac 100644 --- a/setup.py +++ b/setup.py @@ -50,19 +50,19 @@ ext_modules = [LateIncludeExtension("friture_extensions.exp_smoothing_conv", # these will be installed when calling 'pip install friture' # they are also retrieved by 'requirements.txt' install_requires = [ -- "sounddevice==0.3.14", -- "rtmixer==0.1.0", -- "PyOpenGL==3.1.4", -- "PyOpenGL-accelerate==3.1.4", -- "docutils==0.15.2", -- "numpy==1.17.4", -- "PyQt5==5.13.2", -- "appdirs==1.4.3", +- "sounddevice==0.4.2", +- "rtmixer==0.1.3", +- "PyOpenGL==3.1.5", +- "PyOpenGL-accelerate==3.1.5", +- "docutils==0.17.1", +- "numpy==1.21.1", +- "PyQt5==5.15.4", +- "appdirs==1.4.4", - "pyrr==0.10.3", -+ "sounddevice>=0.3.14", -+ "rtmixer>=0.1.0", ++ "sounddevice>=0.4.1", ++ "rtmixer>=0.1.1", + "PyOpenGL>=3.1.4", -+ "PyOpenGL-accelerate>=3.1.4", -+ "docutils>=0.15.2", -+ "numpy>=1.17.4", -+ "PyQt5>=5.13.2", -+ "appdirs>=1.4.3", ++ "PyOpenGL-accelerate>=3.1.5", ++ "docutils>=0.17.1", ++ "numpy>=1.20.3", ++ "PyQt5>=5.15.4", ++ "appdirs>=1.4.4", + "pyrr>=0.10.3", ] # Cython and numpy are needed when running setup.py, to build extensions --setup_requires=["numpy==1.17.4", "Cython==0.29.14"] -+setup_requires=["numpy>=1.17.4", "Cython>=0.29.14"] +-setup_requires=["numpy==1.21.1", "Cython==0.29.24"] ++setup_requires=["numpy>=1.20.3", "Cython>=0.29.22"] with open(join(dirname(__file__), 'README.rst')) as f: long_description = f.read() diff --git a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix index 05ab8b49a69e..b282c5c5f210 100644 --- a/pkgs/applications/networking/instant-messengers/signal-cli/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-cli/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "signal-cli"; - version = "0.8.1"; + version = "0.8.5"; # Building from source would be preferred, but is much more involved. src = fetchurl { url = "https://github.com/AsamK/signal-cli/releases/download/v${version}/signal-cli-${version}.tar.gz"; - sha256 = "sha256-Lq1RSJ1VIa6MFTiTbGqNy7IqliJwGeuegm/1+RRtu+I="; + sha256 = "sha256-H895fyI6fdrrqhcgKMxzGSxO5BFuuizjfjBEwvl1yyg="; }; buildInputs = lib.optionals stdenv.isLinux [ libmatthew_java dbus dbus_java ]; diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 43ff0018714f..f06d2136b8c6 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -613,7 +613,7 @@ rec { command ? "${package.meta.mainProgram or package.pname or package.name} --version", version ? package.version, }: runCommand "test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } '' - ${command} | grep -Fw ${version} + ${command} |& grep -Fw ${version} touch $out ''; } diff --git a/pkgs/development/beam-modules/erlang-ls/default.nix b/pkgs/development/beam-modules/erlang-ls/default.nix index 4ed1e2fb2e9e..9f7d434193a4 100644 --- a/pkgs/development/beam-modules/erlang-ls/default.nix +++ b/pkgs/development/beam-modules/erlang-ls/default.nix @@ -1,10 +1,11 @@ -{ fetchFromGitHub, fetchHex, rebar3Relx, buildRebar3, rebar3-proper, stdenv, lib }: +{ fetchFromGitHub, fetchgit, fetchHex, rebar3Relx, buildRebar3, rebar3-proper +, stdenv, writeScript, lib }: let version = "0.18.0"; owner = "erlang-ls"; repo = "erlang_ls"; deps = import ./rebar-deps.nix { - inherit fetchHex fetchFromGitHub; + inherit fetchHex fetchFromGitHub fetchgit; builder = buildRebar3; overrides = (self: super: { proper = super.proper.overrideAttrs (_: { @@ -45,4 +46,22 @@ rebar3Relx { platforms = platforms.unix; license = licenses.asl20; }; + passthru.updateScript = writeScript "update.sh" '' + #!/usr/bin/env nix-shell + #! nix-shell -i bash -p common-updater-scripts coreutils git gnused gnutar gzip "rebar3WithPlugins { globalPlugins = [ beamPackages.rebar3-nix ]; }" + + set -ox errexit + latest=$(list-git-tags https://github.com/${owner}/${repo}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1) + if [[ "$latest" != "${version}" ]]; then + nixpkgs="$(git rev-parse --show-toplevel)" + nix_path="$nixpkgs/pkgs/development/beam-modules/erlang-ls" + update-source-version erlang-ls "$latest" --version-key=version --print-changes --file="$nix_path/default.nix" + tmpdir=$(mktemp -d) + cp -R $(nix-build $nixpkgs --no-out-link -A erlang-ls.src)/* "$tmpdir" + DEBUG=1 + (cd "$tmpdir" && HOME=. rebar3 as test nix lock -o "$nix_path/rebar-deps.nix") + else + echo "erlang-ls is already up-to-date" + fi + ''; } diff --git a/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix b/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix index 5d55ce0c5236..75d033a13d58 100644 --- a/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix +++ b/pkgs/development/beam-modules/erlang-ls/rebar-deps.nix @@ -1,6 +1,6 @@ # Generated by rebar3_nix let fetchOnly = { src, ... }: src; -in { builder ? fetchOnly, fetchHex, fetchFromGitHub, overrides ? (x: y: { }) }: +in { builder ? fetchOnly, fetchHex, fetchgit, fetchFromGitHub, overrides ? (x: y: { }) }: let self = packages // (overrides self packages); packages = with self; { diff --git a/pkgs/development/python-modules/fontparts/default.nix b/pkgs/development/python-modules/fontparts/default.nix index 8ed3ef17adb5..158806f1be86 100644 --- a/pkgs/development/python-modules/fontparts/default.nix +++ b/pkgs/development/python-modules/fontparts/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "fontParts"; - version = "0.9.10"; + version = "0.9.11"; src = fetchPypi { inherit pname version; - sha256 = "0hwjnqbkcfkhigx581w4532vddsx5wiy73gx46kjisp0hlir9628"; + sha256 = "558a5f681fcf7ca0bb5a1c68917b5d9b61c77d517833a01ea1667773d13f4012"; extension = "zip"; }; diff --git a/pkgs/development/python-modules/solax/default.nix b/pkgs/development/python-modules/solax/default.nix index 2ed8d7086bbb..09e09d941823 100644 --- a/pkgs/development/python-modules/solax/default.nix +++ b/pkgs/development/python-modules/solax/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "solax"; - version = "0.2.7"; + version = "0.2.8"; src = fetchPypi { inherit pname version; - sha256 = "sha256-02cIOIow+eHBgYa7Dnl7b31j3I8WRxGuTpwHFKL4XYQ="; + sha256 = "sha256-bOpDrbRbdsb4XgEksAQG4GE26XSTwGAECq9Fh//zoYc="; }; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 4406bb41aee0..eb244ae91df8 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -328,6 +328,7 @@ let RSclient = [ pkgs.openssl.dev ]; Rserve = [ pkgs.openssl ]; Rssa = [ pkgs.fftw.dev ]; + rsvg = [ pkgs.pkg-config ]; runjags = [ pkgs.jags ]; RVowpalWabbit = [ pkgs.zlib.dev pkgs.boost ]; rzmq = [ pkgs.zeromq pkgs.pkg-config ]; @@ -450,6 +451,7 @@ let glmnet = [ pkgs.libiconv ]; mvtnorm = [ pkgs.libiconv ]; statmod = [ pkgs.libiconv ]; + rsvg = [ pkgs.librsvg.dev ]; }; packagesRequireingX = [ diff --git a/pkgs/development/tools/buf/default.nix b/pkgs/development/tools/buf/default.nix index 84979df92c24..f3271b0563df 100644 --- a/pkgs/development/tools/buf/default.nix +++ b/pkgs/development/tools/buf/default.nix @@ -3,19 +3,21 @@ , fetchFromGitHub , protobuf , git +, testVersion +, buf }: buildGoModule rec { pname = "buf"; - version = "0.50.0"; + version = "0.51.1"; src = fetchFromGitHub { owner = "bufbuild"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Kg3p6BsYrIGn16VQ87TQwa7B+YVEq6oCSd3Je2A6NC8="; + sha256 = "sha256-iFSmanP+2PgmOXtubDdLfa+AIQSAWHFNpyB1IP6IF5I="; }; - vendorSha256 = "sha256-0vvDzs4LliEm202tScmzL+riL3FqHdvawhzU0lPkRew="; + vendorSha256 = "sha256-0rVHINb04GZlH6DSjMt/h7UdNtZJERAyO1S99rAxUyY="; patches = [ # Skip a test that requires networking to be available to work. @@ -54,13 +56,7 @@ buildGoModule rec { runHook postInstall ''; - doInstallCheck = true; - installCheckPhase = '' - runHook preInstallCheck - $out/bin/buf --help - $out/bin/buf --version 2>&1 | grep "${version}" - runHook postInstallCheck - ''; + passthru.tests.version = testVersion { package = buf; }; meta = with lib; { homepage = "https://buf.build"; diff --git a/pkgs/development/tools/database/sqlfluff/default.nix b/pkgs/development/tools/database/sqlfluff/default.nix index 3b221e5ce4e0..cd9779c45e8e 100644 --- a/pkgs/development/tools/database/sqlfluff/default.nix +++ b/pkgs/development/tools/database/sqlfluff/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "sqlfluff"; - version = "0.6.2"; + version = "0.6.3"; disabled = python3.pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "sha256-N1ZIm5LsKXXu3CyqFJZd7biaIhVW1EMBLKajgSAwc0g="; + sha256 = "sha256-rGtaxa75cFv7LjRI5yuTgKW7F2t8llejcrnjKlUdyEY="; }; propagatedBuildInputs = with python3.pkgs; [ diff --git a/pkgs/development/tools/golangci-lint/default.nix b/pkgs/development/tools/golangci-lint/default.nix index 32af811c0005..4e7711926eac 100644 --- a/pkgs/development/tools/golangci-lint/default.nix +++ b/pkgs/development/tools/golangci-lint/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "golangci-lint"; - version = "1.41.1"; + version = "1.42.0"; src = fetchFromGitHub { owner = "golangci"; repo = "golangci-lint"; rev = "v${version}"; - sha256 = "sha256-7xokU2uw7oiXhirTKuNfqJ143PlnI7M1zSixT0S6jtE="; + sha256 = "sha256-xwJZfWDtA/6HkYZmGyhL/44xU8qLmJ2kk3Uqft0yivE="; }; - vendorSha256 = "sha256-s0ZFQJIhF23FtLol1Gegljf6eyGkCmVxTKmHbQBtPvM="; + vendorSha256 = "sha256-lOVGyxQcWG99hO+Eff2cNA5gW4DhsDrBY5Ejj0s4v4Q="; doCheck = false; diff --git a/pkgs/os-specific/linux/ply/default.nix b/pkgs/os-specific/linux/ply/default.nix index e62716e47967..916aa39eee22 100644 --- a/pkgs/os-specific/linux/ply/default.nix +++ b/pkgs/os-specific/linux/ply/default.nix @@ -1,19 +1,16 @@ { lib, stdenv, kernel, fetchFromGitHub, autoreconfHook, bison, flex, p7zip, rsync }: -assert kernel != null -> lib.versionAtLeast kernel.version "4.0"; - -let - version = "1.0.beta1-9e810b1"; -in stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "ply"; - inherit version; + version = "2.1.1-${lib.substring 0 7 src.rev}"; + nativeBuildInputs = [ autoreconfHook flex bison p7zip rsync ]; src = fetchFromGitHub { owner = "iovisor"; repo = "ply"; - rev = "9e810b157ba079c32c430a7d4c6034826982056e"; - sha256 = "15cp6iczawaqlhsa0af6i37zn5iq53kh6ya8s2hzd018yd7mhg50"; + rev = "e25c9134b856cc7ffe9f562ff95caf9487d16b59"; + sha256 = "1178z7vvnjwnlxc98g2962v16878dy7bd0b2njsgn4vqgrnia7i5"; }; preAutoreconf = '' @@ -34,9 +31,10 @@ in stdenv.mkDerivation { ''; meta = with lib; { - description = "dynamic Tracing in Linux"; + description = "Dynamic tracing in Linux"; homepage = "https://wkz.github.io/ply/"; - license = [ licenses.gpl2 ]; + license = [ licenses.gpl2Only ]; maintainers = with maintainers; [ mic92 mbbx6spp ]; + broken = lib.versionOlder kernel.version "4.0"; }; } diff --git a/pkgs/tools/misc/mdr/default.nix b/pkgs/tools/misc/mdr/default.nix new file mode 100644 index 000000000000..095e7f35feba --- /dev/null +++ b/pkgs/tools/misc/mdr/default.nix @@ -0,0 +1,30 @@ +{ lib, fetchFromGitHub, buildGoModule }: + +buildGoModule rec { + pname = "mdr"; + version = "0.2.5"; + + src = fetchFromGitHub { + owner = "MichaelMure"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-ibM3303pXnseAFP9qFTOzj0G/SxRPX+UeRfbJ+MCABk="; + }; + + vendorSha256 = "sha256-5jzU4EybEGKoEXCFhnu7z4tFRS9fgf2wJXhkvigRM0E="; + + ldflags = [ + "-s" + "-w" + "-X main.GitCommit=${src.rev}" + "-X main.GitLastTag=${version}" + "-X main.GitExactTag=${version}" + ]; + + meta = with lib; { + description = "MarkDown Renderer for the terminal"; + homepage = "https://github.com/MichaelMure/mdr"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/tools/misc/smenu/default.nix b/pkgs/tools/misc/smenu/default.nix index 1d1ed78b2faf..5ba4164346f6 100644 --- a/pkgs/tools/misc/smenu/default.nix +++ b/pkgs/tools/misc/smenu/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, ncurses }: stdenv.mkDerivation rec { - version = "0.9.17"; + version = "0.9.18"; pname = "smenu"; src = fetchFromGitHub { owner = "p-gen"; repo = "smenu"; rev = "v${version}"; - sha256 = "1p8y1fgrfb7jxmv5ycvvnqaz7ghdi50paisgzk71169fqwp1crfa"; + sha256 = "sha256-8ALY3dsUEJxGsDnYTOxNAmJbwmmZIV8GuHjNg0vPFUQ="; }; buildInputs = [ ncurses ]; diff --git a/pkgs/tools/system/sleuthkit/default.nix b/pkgs/tools/system/sleuthkit/default.nix index 912afb7021ca..6dc84da1e14e 100644 --- a/pkgs/tools/system/sleuthkit/default.nix +++ b/pkgs/tools/system/sleuthkit/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, libewf, afflib, openssl, zlib }: stdenv.mkDerivation rec { - version = "4.10.2"; + version = "4.11.0"; pname = "sleuthkit"; src = fetchFromGitHub { owner = "sleuthkit"; repo = "sleuthkit"; rev = "${pname}-${version}"; - sha256 = "sha256-N0/spV/Bxk/UNULPot82Vw1uTIxy/Arf84wqUp6W2Tc="; + sha256 = "sha256-cY55zK6N3tyCLBJtZn4LhK9kLkikJjg640Pm/NA0ALY="; }; postPatch = '' diff --git a/pkgs/tools/text/xidel/default.nix b/pkgs/tools/text/xidel/default.nix index 0996cf944eb0..97c74e370089 100644 --- a/pkgs/tools/text/xidel/default.nix +++ b/pkgs/tools/text/xidel/default.nix @@ -1,48 +1,92 @@ -{ lib, stdenv, fetchurl, dpkg }: +{ lib, stdenv, fetchsvn, fetchFromGitHub, fpc }: -stdenv.mkDerivation rec { +let + flreSrc = fetchFromGitHub { + owner = "benibela"; + repo = "flre"; + rev = "5aa8a9e032feff7a5790104f2d53fa74c70bb1d9"; # latest as of 0.9.8 release date + sha256 = "1zny494jm92fjgfirzwmxff988j4yygblaxmaclkkmcvzkjrzs05"; + }; + synapseSrc = fetchsvn { + url = "http://svn.code.sf.net/p/synalist/code/synapse/40/"; + rev = 237; + sha256 = "0ciqd2xgpinwrk42cpyinh9gz2i5s5rlww4mdlsca1h6saivji96"; + }; + rcmdlineSrc = fetchFromGitHub { + owner = "benibela"; + repo = "rcmdline"; + rev = "96859e574e82d76eae49d5552a8c5aa7574a5987"; # latest as of 0.9.8 release date + sha256 = "0vwvpwrxsy9axicbck143yfxxrdifc026pv9c2lzqxzskf9fd78b"; + }; + internettoolsSrc = fetchFromGitHub { + owner = "benibela"; + repo = "internettools"; + rev = "c9c5cc3a87271180d4fb5bb0b17040763d2cfe06"; # latest as of 0.9.8 release date + sha256 = "057hn7cb1vy827gvim3b6vwgfdh2ckjy8h9yj1ry7lv6hw8ynx6n"; + }; +in stdenv.mkDerivation rec { pname = "xidel"; - version = "0.9.6"; + version = "0.9.8"; - ## Source archive lacks file (manageUtils.sh), using pre-built package for now. - #src = fetchurl { - # url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/${name}.src.tar.gz"; - # sha256 = "1h5xn16lgzx0s94iyhxa50lk05yf0af44nzm5w5k57615nd82kz2"; - #}; + src = fetchFromGitHub { + owner = "benibela"; + repo = pname; + rev = "Xidel_${version}"; + sha256 = "0q75jjyciybvj6y17s2283zis9fcw8w5pfsq8bn7diinnbjnzgl6"; + }; - src = - if stdenv.hostPlatform.system == "x86_64-linux" then - fetchurl { - url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_amd64.deb"; - sha256 = "0hskc74y7p4j1x33yx0w4fvr610p2yimas8pxhr6bs7mb9b300h7"; - } - else if stdenv.hostPlatform.system == "i686-linux" then - fetchurl { - url = "mirror://sourceforge/videlibri/Xidel/Xidel%20${version}/xidel_${version}-1_i386.deb"; - sha256 = "07yk5sk1p4jm0jmgjwdm2wq8d2wybi1wkn1qq5j5y03z1pdc3fi6"; - } - else throw "xidel is not supported on ${stdenv.hostPlatform.system}"; + nativeBuildInputs = [ fpc ]; - buildInputs = [ dpkg ]; - - unpackPhase = '' - dpkg-deb -x ${src} ./ + patchPhase = '' + patchShebangs \ + build.sh \ + tests/test.sh \ + tests/tests-file-module.sh \ + tests/tests.sh \ + tests/downloadTest.sh \ + tests/downloadTests.sh \ + tests/zorbajsoniq.sh \ + tests/zorbajsoniq/download.sh ''; - dontBuild = true; + preBuildPhase = '' + mkdir -p import/{flre,synapse} rcmdline internettools + cp -R ${flreSrc}/. import/flre + cp -R ${synapseSrc}/. import/synapse + cp -R ${rcmdlineSrc}/. rcmdline + cp -R ${internettoolsSrc}/. internettools + ''; + + buildPhase = '' + runHook preBuildPhase + ./build.sh + runHook postBuildPhase + ''; installPhase = '' - mkdir -p "$out/bin" - cp -a usr/* "$out/" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/bin/xidel" + mkdir -p "$out/bin" "$out/share/man/man1" + cp meta/xidel.1 "$out/share/man/man1/" + cp xidel "$out/bin/" + ''; + + doCheck = true; + + checkPhase = '' + # Not all, if any, of these tests are blockers. Failing or not this phase will pass. + # As of 2021-08-15, all of 37 failed tests are linked with the lack of network access. + ./tests/tests.sh + ''; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/xidel --version | grep "${version}" ''; meta = with lib; { - description = "Command line tool to download and extract data from html/xml pages"; - homepage = "http://videlibri.sourceforge.net/xidel.html"; - # source contains no license info (AFAICS), but sourceforge says GPLv2 - license = licenses.gpl2; - # more platforms will be supported when we switch to source build + description = "Command line tool to download and extract data from HTML/XML pages as well as JSON APIs"; + homepage = "https://www.videlibri.de/xidel.html"; + license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = [ maintainers.bjornfor ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c5406e06231a..3d565149434d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1674,6 +1674,8 @@ with pkgs; lsix = callPackage ../tools/graphics/lsix { }; + mdr = callPackage ../tools/misc/mdr { }; + mpdevil = callPackage ../applications/audio/mpdevil { }; pacparser = callPackage ../tools/networking/pacparser { }; diff --git a/pkgs/top-level/packages-config.nix b/pkgs/top-level/packages-config.nix index 84db6fa21ee6..d7dfbf5860bb 100644 --- a/pkgs/top-level/packages-config.nix +++ b/pkgs/top-level/packages-config.nix @@ -6,37 +6,32 @@ # Enable recursion into attribute sets that nix-env normally doesn't look into # so that we can get a more complete picture of the available packages for the # purposes of the index. - packageOverrides = super: - let - recurseIntoAttrs = sets: - super.lib.genAttrs - (builtins.filter (set: builtins.hasAttr set super) sets) - (set: super.recurseIntoAttrs (builtins.getAttr set super)); - in recurseIntoAttrs [ - "roundcubePlugins" - "emscriptenfastcompPackages" - "fdbPackages" - "nodePackages_latest" - "nodePackages" - "platformioPackages" - "haskellPackages" - "idrisPackages" - "sconsPackages" - "gns3Packages" - "quicklispPackagesClisp" - "quicklispPackagesSBCL" - "rPackages" - "apacheHttpdPackages_2_4" - "zabbix50" - "zabbix40" - "zabbix30" - "fusePackages" - "nvidiaPackages" - "sourceHanPackages" - "atomPackages" - "emacs27.pkgs" - "steamPackages" - "ut2004Packages" - "zeroadPackages" - ]; + packageOverrides = super: with super; lib.mapAttrs (_: set: recurseIntoAttrs set) { + inherit (super) + apacheHttpdPackages + atomPackages + fdbPackages + fusePackages + gns3Packages + haskellPackages + idrisPackages + nodePackages + nodePackages_latest + platformioPackages + quicklispPackagesClisp + quicklispPackagesSBCL + rPackages + roundcubePlugins + sconsPackages + sourceHanPackages + steamPackages + ut2004Packages + zabbix40 + zabbix50 + zeroadPackages + ; + + # This is an alias which we disallow by default; explicitly allow it + emacs27Packages = emacs27.pkgs; + }; }