From c58908483f97378e0c7a8fe54d9013137b46282f Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 14 May 2021 18:34:11 +0200 Subject: [PATCH] unxwb: init at 0.3.6 --- flake.nix | 3 +++ unxwb/default.nix | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 unxwb/default.nix diff --git a/flake.nix b/flake.nix index dcad84d..cd9eb97 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,8 @@ textidote = callPackage ./textidote { }; + unxwb = callPackage ./unxwb { }; + VisiCut = callPackage ./VisiCut { }; }; } // flake-utils.lib.eachDefaultSystem (system: @@ -58,6 +60,7 @@ cyanrip deemix textidote + unxwb VisiCut; }; diff --git a/unxwb/default.nix b/unxwb/default.nix new file mode 100644 index 0000000..5d9a7e1 --- /dev/null +++ b/unxwb/default.nix @@ -0,0 +1,39 @@ +{ lib, stdenv, fetchzip, zlib }: + +stdenv.mkDerivation rec { + pname = "unxwb"; + version = "0.3.6"; + + src = fetchzip { + # upstream URL (https://aluigi.altervista.org/papers/unxwb.zip) is not stable + url = "https://web.archive.org/web/20210401211235if_/http://aluigi.altervista.org/papers/unxwb.zip"; + sha256 = "1i7m7dacfnjs22d0vk49ljmszxcvrqfr6x9brpp0qfggvqdfaw55"; + stripRoot = false; + }; + + buildInputs = [ zlib ]; + + buildPhase = '' + runHook preBuild + + gcc -lz -I. -O3 -o ${pname} ${pname}.c + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -D ${pname} $out/bin/${pname} + + runHook postInstall + ''; + + meta = with lib; { + description = "A tool for extracting the data contained in XWB archives"; + homepage = "https://aluigi.altervista.org/papers.htm"; + license = with licenses; [ gpl2Plus ]; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}