nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 91b5d8fb52527f6edbb7af3d421c7f76d532bb5a
parent 458eae6c0321707a4cc2153e6fb48c0ef3e295a2
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sun, 12 Apr 2020 01:19:44 +0300

Refactoring

Diffstat:
Mpkgs/data/dicts/cambridge/default.nix | 6+++---
Mpkgs/data/dicts/macmillan/default.nix | 6+++---
Mpkgs/data/dicts/webster/default.nix | 6+++---
Mpkgs/data/maps/qmapshack-dem/default.nix | 50++++++++++++++++++++++++++++++--------------------
Mpkgs/development/tools/gef/default.nix | 39++++++++++++++++++++++++++++++---------
Mpkgs/tools/geo/gmaptool/default.nix | 2+-
6 files changed, 70 insertions(+), 39 deletions(-)

diff --git a/pkgs/data/dicts/cambridge/default.nix b/pkgs/data/dicts/cambridge/default.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchzip }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "cambridge"; version = "2.4.2"; - src = fetchzip { + src = fetchurl { url = "http://download.huzheng.org/bigdict/stardict-Cambridge_Advanced_Learners_Dictionary_3th_Ed-${version}.tar.bz2"; - sha256 = "09x4dmgb49mza87f51csvmq273g5hb3d8pzbakpz0bm0qm02qcsi"; + sha256 = "0mqrf5fr6hx3bjy1brsggmkrii2xf497jkaj6zf1hjxnp0ijswgr"; }; installPhase = '' diff --git a/pkgs/data/dicts/macmillan/default.nix b/pkgs/data/dicts/macmillan/default.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchzip }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "macmillan"; version = "2.4.2"; - src = fetchzip { + src = fetchurl { url = "http://download.huzheng.org/bigdict/stardict-Macmillan_English_Dictionary-${version}.tar.bz2"; - sha256 = "171q6p6f81yi9gjk9rw49kfm2dr6c7aj6rpnavsn20g426pskj2r"; + sha256 = "1xg4xvxnni5vc371sd0bvskl1vly6p62q3c8r36bd2069ln7jy8r"; }; installPhase = '' diff --git a/pkgs/data/dicts/webster/default.nix b/pkgs/data/dicts/webster/default.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchzip }: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "webster"; version = "2.4.2"; - src = fetchzip { + src = fetchurl { url = "http://download.huzheng.org/bigdict/stardict-Webster_s_Unabridged_3-${version}.tar.bz2"; - sha256 = "0bbqawgvp1h4a403xa3f7n417gv9wxjgll8cymm75qsrh7z9w7c2"; + sha256 = "1gj33px44d4ywhnxv7x5hxvh43f8m7skwmhvc62ld0c50blrqi7a"; }; installPhase = '' diff --git a/pkgs/data/maps/qmapshack-dem/default.nix b/pkgs/data/maps/qmapshack-dem/default.nix @@ -5,26 +5,36 @@ stdenv.mkDerivation rec { version = "2014-05-25"; srcs = [ - (fetchurl { - url = "http://viewfinderpanoramas.org/dem1/O35.zip"; - sha256 = "0wc5l7vcm33qkmbmjaij2mkxv59922150qjabjhhxqaf7xxv3q65"; - }) - (fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P35.zip"; - sha256 = "093zz7yx8kcykip83k8gzby9l6lx03nsvzjw21axjlbd48fl26ac"; - }) - (fetchurl { - url = "http://viewfinderpanoramas.org/dem1/P36.zip"; - sha256 = "15icmvc2md6g9a89ln4ckkclynfhcf21yabfcr7azp7ivy23f46i"; - }) - (fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q35.zip"; - sha256 = "0lvm43v03i80v6b9phwbd3mdhqi6y2iklgp4cc0qx56pg7z6wdaa"; - }) - (fetchurl { - url = "http://viewfinderpanoramas.org/dem1/Q36.zip"; - sha256 = "1l05ljhxdyh2lb5ydlr4xfjbx4lvg6g2a2fg097yqhw95n3xxqv1"; - }) + ( + fetchurl { + url = "http://viewfinderpanoramas.org/dem1/O35.zip"; + sha256 = "0wc5l7vcm33qkmbmjaij2mkxv59922150qjabjhhxqaf7xxv3q65"; + } + ) + ( + fetchurl { + url = "http://viewfinderpanoramas.org/dem1/P35.zip"; + sha256 = "093zz7yx8kcykip83k8gzby9l6lx03nsvzjw21axjlbd48fl26ac"; + } + ) + ( + fetchurl { + url = "http://viewfinderpanoramas.org/dem1/P36.zip"; + sha256 = "15icmvc2md6g9a89ln4ckkclynfhcf21yabfcr7azp7ivy23f46i"; + } + ) + ( + fetchurl { + url = "http://viewfinderpanoramas.org/dem1/Q35.zip"; + sha256 = "0lvm43v03i80v6b9phwbd3mdhqi6y2iklgp4cc0qx56pg7z6wdaa"; + } + ) + ( + fetchurl { + url = "http://viewfinderpanoramas.org/dem1/Q36.zip"; + sha256 = "1l05ljhxdyh2lb5ydlr4xfjbx4lvg6g2a2fg097yqhw95n3xxqv1"; + } + ) ]; unpackPhase = "for src in $srcs; do ${unzip}/bin/unzip $src; done"; diff --git a/pkgs/development/tools/gef/default.nix b/pkgs/development/tools/gef/default.nix @@ -1,4 +1,14 @@ -{ stdenv, fetchFromGitHub, sources, runtimeShell, procps, binutils-unwrapped, bash, python3, gdb }: +{ stdenv +, fetchFromGitHub +, sources +, runtimeShell +, writeScript +, procps +, binutils-unwrapped +, bash +, python3 +, gdb +}: stdenv.mkDerivation rec { pname = "gef"; @@ -15,16 +25,27 @@ stdenv.mkDerivation rec { dontBuild = true; doCheck = false; + initGef = writeScript "init-gef" '' + source @out@/share/gef/gef.py + ''; + + gdbGef = writeScript "gdb-gef" ( + with stdenv.lib; '' + #!${runtimeShell} + export PATH="${makeBinPath [ procps binutils-unwrapped ]}:$PATH" + ${gdb}/bin/gdb -x @out@/share/gef/init-gef "$@" + '' + ); + installPhase = '' install -Dm644 gef.py -t $out/share/gef - echo "source $out/share/gef/gef.py" > $out/share/gef/init-gef - install -dm755 $out/bin - cat << EOF > $out/bin/gdb-gef - #!${runtimeShell} - export PATH="${stdenv.lib.makeBinPath [ procps binutils-unwrapped ]}:\$PATH" - ${gdb}/bin/gdb -x $out/share/gef/init-gef "\$@" - EOF - chmod +x $out/bin/gdb-gef + install -Dm644 ${initGef} $out/share/gef/init-gef + install -Dm755 ${gdbGef} $out/bin/gdb-gef + ''; + + postFixup = '' + substituteInPlace $out/share/gef/init-gef --subst-var out + substituteInPlace $out/bin/gdb-gef --subst-var out ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/geo/gmaptool/default.nix b/pkgs/tools/geo/gmaptool/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "0.8.220"; src = fetchzip { - url = "https://www.gmaptool.eu/sites/default/files/lgmt08220.zip"; + url = "https://www.gmaptool.eu/sites/default/files/lgmt${stdenv.lib.replaceStrings [ "." ] [ "" ] version}.zip"; sha256 = "0wf9ys52slf2hzmfl81d8754alfqiylsk7g5af3lxsiivd5284gy"; stripRoot = false; };