From 44936c416f07e33cfa4f419ad3cc343e460da8e1 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Sat, 9 Feb 2019 19:06:51 +0100 Subject: [PATCH 1/4] lib.licenses: add Open Software License 2.0 --- lib/licenses.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index ed91b5adedbf9b..07957d99a15f18 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -541,6 +541,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { fullName = "OpenSSL License"; }; + osl2 = spdx { + spdxId = "OSL-2.0"; + fullName = "Open Software License 2.0"; + }; + osl21 = spdx { spdxId = "OSL-2.1"; fullName = "Open Software License 2.1"; From 76b3cd665ff7628bb307c99a74dd0cd3ce4c4c94 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Mon, 3 Dec 2018 15:13:37 +0100 Subject: [PATCH 2/4] perlPackages.TimePeriod: init at 1.25 --- pkgs/top-level/perl-packages.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 4bcc7f4d32c7e9..c2527f2d2469ff 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -16838,6 +16838,18 @@ let }; }; + TimePeriod = buildPerlPackage { + name = "Time-Period-1.25"; + src = fetchurl { + url = "mirror://cpan/authors/id/P/PB/PBOYD/Time-Period-1.25.tar.gz"; + sha256 = "d07fa580529beac6a9c8274c6bf220b4c3aade685df65c1669d53339bf6ef1e8"; + }; + meta = { + description = "A Perl module to deal with time periods"; + license = stdenv.lib.licenses.gpl1; + }; + }; + Tk = buildPerlPackage rec { name = "Tk-804.034"; src = fetchurl { From 9cf5079ec34296ccc72c3d804ef78b4ce749bcbb Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Mon, 3 Dec 2018 16:55:32 +0100 Subject: [PATCH 3/4] dirvish: init at 1.2.1 --- pkgs/tools/backup/dirvish/default.nix | 61 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/tools/backup/dirvish/default.nix diff --git a/pkgs/tools/backup/dirvish/default.nix b/pkgs/tools/backup/dirvish/default.nix new file mode 100644 index 00000000000000..ee5eee893f44fa --- /dev/null +++ b/pkgs/tools/backup/dirvish/default.nix @@ -0,0 +1,61 @@ +{ fetchurl, stdenv, makeWrapper, perl, rsync, perlPackages }: + +stdenv.mkDerivation rec { + name = "dirvish-1.2.1"; + src = fetchurl { + url = "http://dirvish.org/${name}.tgz"; + sha256 = "6b7f29c3541448db3d317607bda3eb9bac9fb3c51f970611ffe27e9d63507dcd"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl ] ++ (with perlPackages; [ GetoptLong TimeParseDate TimePeriod ]); + + executables = [ "dirvish" "dirvish-runall" "dirvish-expire" "dirvish-locate" ]; + manpages = [ "dirvish.8" "dirvish-runall.8" "dirvish-expire.8" "dirvish-locate.8" "dirvish.conf.5" ]; + + buildPhase = '' + HEADER="#!${perl}/bin/perl + + \$CONFDIR = \"/etc/dirvish\"; + + " + + for executable in $executables; do + ( + echo "$HEADER" + cat $executable.pl loadconfig.pl + ) > $executable + chmod +x $executable + done + ''; + + installPhase = '' + mkdir -p $out/bin + cp --target-directory=$out/bin $executables + + for manpage in $manpages; do + if [[ $manpage =~ \.([[:digit:]]+)$ ]]; then + section=''${BASH_REMATCH[1]} + mkdir -p $out/man/man$section + cp --target-directory=$out/man/man$section $manpage + else + echo "Couldn't determine man page section by filename" + exit 1 + fi + done + ''; + + postFixup = '' + for executable in $executables; do + wrapProgram $out/bin/$executable \ + --set PERL5LIB "$PERL5LIB" + done + ''; + + meta = with stdenv.lib; { + description = "Dirvish is a fast, disk based, rotating network backup system"; + homepage = http://dirvish.org/; + license = stdenv.lib.licenses.osl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2d4989e2ba4578..6b6128b86a56ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2276,6 +2276,8 @@ with pkgs; dirmngr = callPackage ../tools/security/dirmngr { }; + dirvish = callPackage ../tools/backup/dirvish { }; + disper = callPackage ../tools/misc/disper { }; dleyna-connector-dbus = callPackage ../development/libraries/dleyna-connector-dbus { }; From c03098d0873e57670396d2d2399dcffdf703f561 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Sat, 9 Feb 2019 19:19:53 +0100 Subject: [PATCH 4/4] maintainer-list: add winpat --- maintainers/maintainer-list.nix | 5 +++++ pkgs/tools/backup/dirvish/default.nix | 1 + pkgs/top-level/perl-packages.nix | 1 + 3 files changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5d77f75c65c921..b0a609353ff047 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4703,6 +4703,11 @@ email = "windenntw@gmail.com"; name = "Antonio Vargas Gonzalez"; }; + winpat = { + email = "patrickwinter@posteo.ch"; + github = "winpat"; + name = "Patrick Winter"; + }; wizeman = { email = "rcorreia@wizy.org"; github = "wizeman"; diff --git a/pkgs/tools/backup/dirvish/default.nix b/pkgs/tools/backup/dirvish/default.nix index ee5eee893f44fa..829dca52dfe5c3 100644 --- a/pkgs/tools/backup/dirvish/default.nix +++ b/pkgs/tools/backup/dirvish/default.nix @@ -57,5 +57,6 @@ stdenv.mkDerivation rec { homepage = http://dirvish.org/; license = stdenv.lib.licenses.osl2; platforms = platforms.linux; + maintainers = [ maintainers.winpat ]; }; } diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index c2527f2d2469ff..6910f79a7fa6b5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -16847,6 +16847,7 @@ let meta = { description = "A Perl module to deal with time periods"; license = stdenv.lib.licenses.gpl1; + maintainers = [ maintainers.winpat ]; }; };