nur-packages

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

commit 8ccd0484aa7c0314ba38523bfe5a87abccd54bd8
parent 5999f6a5d7ae52aa51b46fb16f66d84a7e4bbe7b
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed,  8 Jul 2020 23:08:29 +0300

Refactoring

Diffstat:
Mci.nix | 27+++++++++++++++------------
Mdefault.nix | 16++++++++++------
Mlib/default.nix | 1-
Mmodules/default.nix | 1-
Mmodules/home-manager/programs/aerc.nix | 28+++++++++++++++-------------
Mmodules/home-manager/programs/goldendict.nix | 1-
Mmodules/home-manager/programs/gpxsee.nix | 10++++++----
Mnix/sources.json | 28++++++++++++++--------------
Mnix/sources.nix | 60++++++++++++++++++++++++++++++------------------------------
Moverlay.nix | 12+++++++-----
Moverlays/default.nix | 1-
Mpkgs/applications/gpxlab/default.nix | 17+++++++----------
Rpkgs/applications/gpxlab/fix-qttranslations-path.diff -> pkgs/applications/gpxlab/fix-qttranslations-path.patch | 0
Mpkgs/applications/gpxsee/default.nix | 17+++++++----------
Rpkgs/applications/gpxsee/fix-qttranslations-path.diff -> pkgs/applications/gpxsee/fix-qttranslations-path.patch | 0
Mpkgs/applications/librewolf/default.nix | 18++++++++++--------
Mpkgs/applications/macpass/default.nix | 19++++++++++++-------
Mpkgs/applications/mapsoft/2.nix | 6+++---
Mpkgs/applications/mapsoft/default.nix | 4++--
Mpkgs/applications/nnn-plugins/default.nix | 4++--
Mpkgs/applications/openorienteering-mapper/default.nix | 17+++++++----------
Rpkgs/applications/openorienteering-mapper/fix-qttranslations-path.diff -> pkgs/applications/openorienteering-mapper/fix-qttranslations-path.patch | 0
Mpkgs/applications/redict/default.nix | 4++--
Mpkgs/applications/wireguard-statusbar/default.nix | 21+++++++++++++--------
Apkgs/build-support/fetchfromgh/default.nix | 11+++++++++++
Apkgs/build-support/fetchwebarchive/default.nix | 11+++++++++++
Mpkgs/data/dicts/huzheng/base.nix | 6+++---
Mpkgs/data/dicts/huzheng/default.nix | 16+++++++++-------
Mpkgs/data/dicts/wiktionary/base.nix | 4++--
Mpkgs/data/maps/freizeitkarte-osm/default.nix | 8+++-----
Mpkgs/data/maps/gpxsee-dem/default.nix | 2+-
Mpkgs/data/maps/gpxsee-maps/default.nix | 8++++----
Mpkgs/data/maps/hiblovgpsmap/default.nix | 17+++++++++--------
Mpkgs/data/maps/maptourist/default.nix | 2+-
Mpkgs/data/maps/mtk-suomi/default.nix | 2+-
Mpkgs/data/maps/opentopomap/default.nix | 8+++-----
Mpkgs/data/maps/qmapshack-dem/default.nix | 2+-
Mpkgs/data/maps/qmapshack-onlinemaps/default.nix | 6+++---
Mpkgs/data/maps/qmapshack-routinodb/default.nix | 4++--
Mpkgs/data/maps/slazav/hr.nix | 6+++---
Mpkgs/data/maps/slazav/podm.nix | 6+++---
Mpkgs/data/themes/goldendict-themes/dark-theme.nix | 6+++---
Mpkgs/data/themes/qtpbfimageplugin-styles/default.nix | 8++++----
Mpkgs/default.nix | 127++++++++++++++++++++++++++++++++++++++++---------------------------------------
Mpkgs/development/libraries/foma/default.nix | 4++--
Mpkgs/development/libraries/geographiclib/default.nix | 8+++++---
Mpkgs/development/libraries/hfst/default.nix | 4++--
Mpkgs/development/libraries/libgarmin/default.nix | 4++--
Mpkgs/development/libraries/libshell/default.nix | 4++--
Mpkgs/development/python-modules/cheetah3/default.nix | 4++--
Mpkgs/development/python-modules/click/default.nix | 12++++++------
Mpkgs/development/python-modules/gpxelevations/default.nix | 4++--
Mpkgs/development/python-modules/mercantile/default.nix | 4++--
Mpkgs/development/python-modules/mikatools/default.nix | 4++--
Mpkgs/development/python-modules/pyephem/default.nix | 4++--
Mpkgs/development/python-modules/pymbtiles/default.nix | 4++--
Mpkgs/development/python-modules/python-hfst/default.nix | 2+-
Mpkgs/development/tools/gef/default.nix | 28++++++++++++++--------------
Mpkgs/embox/default.nix | 35++++++++++++++++++-----------------
Mpkgs/servers/mbtileserver/default.nix | 4++--
Mpkgs/servers/nakarte/default.nix | 10++++++----
Mpkgs/servers/shavit/default.nix | 4++--
Mpkgs/tools/audio/musig/default.nix | 8+++++---
Mpkgs/tools/cfiles/default.nix | 4++--
Mpkgs/tools/dict/gt-bash-client/default.nix | 6+++---
Mpkgs/tools/dict/gt4gd/default.nix | 15++++++++++-----
Mpkgs/tools/dict/lsdreader/default.nix | 4++--
Mpkgs/tools/dict/odict/default.nix | 4++--
Mpkgs/tools/dict/stardict-tools/default.nix | 4++--
Mpkgs/tools/docker-reg-tool/default.nix | 6+++---
Mpkgs/tools/geo/cgpsmapper/default.nix | 13+++++++------
Mpkgs/tools/geo/datamaps/default.nix | 4++--
Mpkgs/tools/geo/elevation/default.nix | 4++--
Mpkgs/tools/geo/gimgtools/default.nix | 6+++---
Mpkgs/tools/geo/gmaptool/default.nix | 11+++++++----
Mpkgs/tools/geo/gpx-layer/default.nix | 4++--
Mpkgs/tools/geo/gpxtools/default.nix | 4++--
Mpkgs/tools/geo/imgdecode/default.nix | 12+++++++-----
Mpkgs/tools/geo/ocad2img/default.nix | 6+++---
Mpkgs/tools/geo/ocad2mp/default.nix | 8++++----
Apkgs/tools/geo/openmtbmap/0001-fix-path.patch | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkgs/tools/geo/openmtbmap/default.nix | 26++++++++++++++++++++++++++
Dpkgs/tools/geo/openmtbmap_openvelomap_linux/0001-fix-path.patch | 61-------------------------------------------------------------
Dpkgs/tools/geo/openmtbmap_openvelomap_linux/default.nix | 30------------------------------
Mpkgs/tools/geo/osm2mp/default.nix | 4++--
Mpkgs/tools/geo/sendmap20/default.nix | 9+++++----
Mpkgs/tools/geo/supermercado/default.nix | 4++--
Mpkgs/tools/geo/tpkutils/default.nix | 4++--
Mpkgs/tools/i18n-editor/default.nix | 22++++++++++++++--------
Mpkgs/tools/morse-talk/default.nix | 4++--
Mpkgs/tools/networking/ish/default.nix | 12+++++++-----
Mpkgs/tools/networking/ptunnel/default.nix | 8+++++---
Mpkgs/tools/supload/default.nix | 4++--
Mpkgs/tools/text/csvquote/default.nix | 8+++-----
Mpkgs/tools/text/csvtools/default.nix | 12++++--------
Mpkgs/tools/xfractint/default.nix | 10++++++----
96 files changed, 587 insertions(+), 530 deletions(-)

diff --git a/ci.nix b/ci.nix @@ -9,12 +9,10 @@ # then your CI will be able to build and cache only those packages for # which this is possible. -{ pkgs ? import <nixpkgs> {} }: +{ pkgs ? import <nixpkgs> { } }: with builtins; - let - isReserved = n: n == "lib" || n == "overlays" || n == "modules"; isDerivation = p: isAttrs p && p ? type && p.type == "derivation"; isBuildable = p: !(p.meta.broken or false) && !(p.meta.skip.ci or false) && p.meta.license.free or true; @@ -29,24 +27,29 @@ let let f = p: if shouldRecurseForDerivations p then flattenPkgs p - else if isDerivation p then [p] - else []; + else if isDerivation p then [ p ] + else [ ]; in - concatMap f (attrValues s); + concatMap f (attrValues s); outputsOf = p: map (o: p.${o}) p.outputs; nurAttrs = import ./default.nix { inherit pkgs; }; nurPkgs = - flattenPkgs - (listToAttrs - (map (n: nameValuePair n nurAttrs.${n}) - (filter (n: !isReserved n) - (attrNames nurAttrs)))); + flattenPkgs ( + listToAttrs ( + map + (n: nameValuePair n nurAttrs.${n}) + ( + filter + (n: !isReserved n) + (attrNames nurAttrs) + ) + ) + ); in - rec { buildPkgs = filter isBuildable nurPkgs; cachePkgs = filter isCacheable buildPkgs; diff --git a/default.nix b/default.nix @@ -6,17 +6,21 @@ # commands such as: # nix-build -A mypackage -{ pkgs ? import <nixpkgs> args +{ pkgs ? import <nixpkgs> args , sources ? import ./nix/sources.nix -, system ? builtins.currentSystem, ... }@args: +, system ? builtins.currentSystem +, ... +}@args: with (import <nixpkgs/lib>).attrsets; { # The `lib`, `modules`, and `overlay` names are special - lib = import ./lib { inherit pkgs; }; # functions - modules = import ./modules; # NixOS modules - overlays = import ./overlays; # nixpkgs overlays + lib = import ./lib { inherit pkgs; }; # functions + modules = import ./modules; # NixOS modules + overlays = import ./overlays; # nixpkgs overlays } // (optionalAttrs (builtins.tryEval pkgs).success (import ./pkgs { inherit sources pkgs; -})) +} +) +) diff --git a/lib/default.nix b/lib/default.nix @@ -5,4 +5,3 @@ with pkgs.lib; { # # hexint = x: hexvals.${toLower x}; } - diff --git a/modules/default.nix b/modules/default.nix @@ -11,4 +11,3 @@ }; }; } - diff --git a/modules/home-manager/programs/aerc.nix b/modules/home-manager/programs/aerc.nix @@ -4,20 +4,22 @@ with lib; let cfg = config.programs.aerc; - accountConfFile = with cfg; generators.toINI {} { - Personal = { - source = "imaps://${gUsername}:${gPassword}@imap.gmail.com:993"; - outgoing = "smtp+plain://${gUsername}:${gPassword}@smtp.gmail.com:587"; - default = "INBOX"; - smtp-starttls = "yes"; - from = - if fullName != "" then - "${fullName} <${gUsername}@gmail.com>" - else - "${gUsername}@gmail.com"; - copy-to = "Sent"; + accountConfFile = with cfg; + generators.toINI + { } { + Personal = { + source = "imaps://${gUsername}:${gPassword}@imap.gmail.com:993"; + outgoing = "smtp+plain://${gUsername}:${gPassword}@smtp.gmail.com:587"; + default = "INBOX"; + smtp-starttls = "yes"; + from = + if fullName != "" then + "${fullName} <${gUsername}@gmail.com>" + else + "${gUsername}@gmail.com"; + copy-to = "Sent"; + }; }; - }; activationScript = with config.xdg; '' $DRY_RUN_CMD install -Dm644 ${pkgs.aerc}/share/aerc/aerc.conf -t ${configHome}/aerc diff --git a/modules/home-manager/programs/goldendict.nix b/modules/home-manager/programs/goldendict.nix @@ -21,7 +21,6 @@ in config = mkIf cfg.enable { home.packages = [ cfg.package - goldendict-dark-theme ]; }; } diff --git a/modules/home-manager/programs/gpxsee.nix b/modules/home-manager/programs/gpxsee.nix @@ -40,7 +40,7 @@ in }; poiPackages = mkOption { - default = []; + default = [ ]; description = "GPXSee POI packages to install."; type = types.listOf types.package; }; @@ -52,7 +52,7 @@ in }; maps = mkOption { - default = []; + default = [ ]; description = ""; type = types.listOf types.str; }; @@ -83,7 +83,8 @@ in name = "${mapDir}/${map}"; value.source = "${cfg.mapsPackage}/share/gpxsee/maps/${map}"; }; - in mkIf (cfg.mapsPackage != null && cfg.maps != []) { + in + mkIf (cfg.mapsPackage != null && cfg.maps != [ ]) { home.file = listToAttrs (map mapXml cfg.maps); } ) @@ -94,7 +95,8 @@ in name = "${poiDir}/${poi.name}"; value.source = "${poi}/share/gpxsee/POI"; }; - in mkIf (cfg.poiPackages != []) { + in + mkIf (cfg.poiPackages != [ ]) { home.file = listToAttrs (map mapPoi cfg.poiPackages); } ) diff --git a/nix/sources.json b/nix/sources.json @@ -166,19 +166,6 @@ "url": "https://github.com/wuyongzheng/gimgtools/archive/92d015749e105c5fb8eb704ae503a5c7e51af2bd.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, - "google-translate-for-goldendict": { - "branch": "master", - "builtin": false, - "description": "Add Google translate to GoldenDict", - "homepage": "https://github.com/xinebf/google-translate-for-goldendict", - "owner": "xinebf", - "repo": "google-translate-for-goldendict", - "rev": "31a1628136302f6fbedf9468f1dae3521a174731", - "sha256": "1w8h2wibwgi7z03fqj0pkh5p0s9czi0ymj2v8ra5xvb2hrdw2g3j", - "type": "tarball", - "url": "https://github.com/xinebf/google-translate-for-goldendict/archive/31a1628136302f6fbedf9468f1dae3521a174731.tar.gz", - "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" - }, "gpx-layer": { "branch": "master", "builtin": false, @@ -270,6 +257,19 @@ "url": "https://github.com/OPHoperHPO/GT-bash-client/archive/215c1ce8b5a99c117e152300e32d0899cd63755c.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "gt4gd": { + "branch": "master", + "builtin": false, + "description": "Add Google translate to GoldenDict", + "homepage": "https://github.com/xinebf/google-translate-for-goldendict", + "owner": "xinebf", + "repo": "google-translate-for-goldendict", + "rev": "31a1628136302f6fbedf9468f1dae3521a174731", + "sha256": "1w8h2wibwgi7z03fqj0pkh5p0s9czi0ymj2v8ra5xvb2hrdw2g3j", + "type": "tarball", + "url": "https://github.com/xinebf/google-translate-for-goldendict/archive/31a1628136302f6fbedf9468f1dae3521a174731.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "hfst": { "branch": "master", "builtin": false, @@ -486,7 +486,7 @@ "url": "https://github.com/odict/odict/archive/0a0a6e6a592ccca3f304fcb4bd4ab7c25e181185.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, - "openmtbmap_openvelomap_linux": { + "openmtbmap": { "branch": "master", "builtin": false, "description": "Linux script to extract and compile garmin *.img map files from openmtbmap.org or openvelomap.org downloads", diff --git a/nix/sources.nix b/nix/sources.nix @@ -1,7 +1,5 @@ # This file has been generated by Niv. - let - # # The fetchers. fetch_<type> fetches specs of type <type>. # @@ -51,20 +49,20 @@ let mkPkgs = sources: let sourcesNixpkgs = - import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {}; + import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { }; hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; hasThisAsNixpkgsPath = <nixpkgs> == ./.; in - if builtins.hasAttr "nixpkgs" sources - then sourcesNixpkgs - else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then - import <nixpkgs> {} - else - abort - '' - Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or - add a package called "nixpkgs" to your sources.json. - ''; + if builtins.hasAttr "nixpkgs" sources + then sourcesNixpkgs + else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then + import <nixpkgs> { } + else + abort + '' + Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or + add a package called "nixpkgs" to your sources.json. + ''; # The actual fetching function. fetch = pkgs: name: spec: @@ -92,31 +90,33 @@ let let inherit (builtins) lessThan nixVersion fetchTarball; in - if lessThan nixVersion "1.12" then - fetchTarball { inherit url; } - else - fetchTarball attrs; + if lessThan nixVersion "1.12" then + fetchTarball { inherit url; } + else + fetchTarball attrs; # fetchurl version that is compatible between all the versions of Nix builtins_fetchurl = { url, sha256 }@attrs: let inherit (builtins) lessThan nixVersion fetchurl; in - if lessThan nixVersion "1.12" then - fetchurl { inherit url; } - else - fetchurl attrs; + if lessThan nixVersion "1.12" then + fetchurl { inherit url; } + else + fetchurl attrs; # Create the final "sources" from the config mkSources = config: - mapAttrs ( - name: spec: - if builtins.hasAttr "outPath" spec - then abort - "The values in sources.json should not have an 'outPath' attribute" - else - spec // { outPath = fetch config.pkgs name spec; } - ) config.sources; + mapAttrs + ( + name: spec: + if builtins.hasAttr "outPath" spec + then abort + "The values in sources.json should not have an 'outPath' attribute" + else + spec // { outPath = fetch config.pkgs name spec; } + ) + config.sources; # The "config" used by the fetchers mkConfig = @@ -131,4 +131,4 @@ let inherit pkgs; }; in -mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } +mkSources (mkConfig { }) // { __functor = _: settings: mkSources (mkConfig settings); } diff --git a/overlay.nix b/overlay.nix @@ -3,13 +3,15 @@ # configuration. self: super: - let isReserved = n: n == "lib" || n == "overlays" || n == "modules"; nameValuePair = n: v: { name = n; value = v; }; nurAttrs = import ./default.nix { pkgs = super; }; in - builtins.listToAttrs - (map (n: nameValuePair n nurAttrs.${n}) - (builtins.filter (n: !isReserved n) - (builtins.attrNames nurAttrs))) +builtins.listToAttrs (map + (n: nameValuePair n nurAttrs.${n}) + (builtins.filter + (n: !isReserved n) + (builtins.attrNames nurAttrs) + ) +) diff --git a/overlays/default.nix b/overlays/default.nix @@ -3,4 +3,3 @@ # # my-overlay = import ./my-overlay; } - diff --git a/pkgs/applications/gpxlab/default.nix b/pkgs/applications/gpxlab/default.nix @@ -6,27 +6,24 @@ , qttools , qttranslations , sources +, substituteAll , withI18n ? true }: -mkDerivation rec { +mkDerivation { pname = "gpxlab"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.gpxlab.rev; src = sources.gpxlab; - patches = [ + patches = (substituteAll { # See https://github.com/NixOS/nixpkgs/issues/86054 - ./fix-qttranslations-path.diff - ]; + src = ./fix-qttranslations-path.patch; + inherit qttranslations; + }); nativeBuildInputs = [ qmake ] ++ (lib.optional withI18n qttools); buildInputs = [ qtbase ]; - postPatch = '' - substituteInPlace GPXLab/main.cpp \ - --subst-var-by qttranslations ${qttranslations} - ''; - preConfigure = lib.optionalString withI18n '' lrelease GPXLab/locale/*.ts ''; diff --git a/pkgs/applications/gpxlab/fix-qttranslations-path.diff b/pkgs/applications/gpxlab/fix-qttranslations-path.patch diff --git a/pkgs/applications/gpxsee/default.nix b/pkgs/applications/gpxsee/default.nix @@ -6,27 +6,24 @@ , qttools , qttranslations , sources +, substituteAll , withI18n ? true }: -mkDerivation rec { +mkDerivation { pname = "gpxsee"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.gpxsee.rev; src = sources.gpxsee; - patches = [ + patches = (substituteAll { # See https://github.com/NixOS/nixpkgs/issues/86054 - ./fix-qttranslations-path.diff - ]; + src = ./fix-qttranslations-path.patch; + inherit qttranslations; + }); nativeBuildInputs = [ qmake ] ++ (lib.optional withI18n qttools); buildInputs = [ qtbase ]; - postPatch = '' - substituteInPlace src/GUI/app.cpp \ - --subst-var-by qttranslations ${qttranslations} - ''; - preConfigure = lib.optionalString withI18n '' lrelease gpxsee.pro ''; diff --git a/pkgs/applications/gpxsee/fix-qttranslations-path.diff b/pkgs/applications/gpxsee/fix-qttranslations-path.patch diff --git a/pkgs/applications/librewolf/default.nix b/pkgs/applications/librewolf/default.nix @@ -1,8 +1,16 @@ { stdenv, fetchgit, fetchurl }: +let + version = "78.0"; -stdenv.mkDerivation rec { + firefox = fetchurl { + url = "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${version}/mac/en-US/Firefox%20${version}.dmg"; + sha256 = "17pl2hm04mvcn0r7s3am2y2xxj8aks2x6gsy1i6k3k0lk09sx839"; + name = "Firefox.dmg"; + }; +in +stdenv.mkDerivation { pname = "librewolf"; - version = "78.0"; + inherit version; src = fetchgit { url = "https://gitlab.com/librewolf-community/browser/macos"; @@ -10,12 +18,6 @@ stdenv.mkDerivation rec { sha256 = "0p517ixkgp3sl7b26mdjr9mwv6155xx8ah85fgpwqnpryr64xs3d"; }; - firefox = fetchurl { - url = "https://download-installer.cdn.mozilla.net/pub/firefox/releases/${version}/mac/en-US/Firefox%20${version}.dmg"; - sha256 = "17pl2hm04mvcn0r7s3am2y2xxj8aks2x6gsy1i6k3k0lk09sx839"; - name = "Firefox.dmg"; - }; - postPatch = '' substituteInPlace package.sh \ --replace "codesign" "/usr/bin/codesign" \ diff --git a/pkgs/applications/macpass/default.nix b/pkgs/applications/macpass/default.nix @@ -1,12 +1,17 @@ -{ stdenv, fetchurl, unzip }: - -stdenv.mkDerivation rec { - pname = "MacPass"; +{ stdenv, fetchfromgh, unzip }: +let version = "0.7.12"; + sha256 = "1gikixbrz1pvyjspp62msdmhjdy1rfkx8jhy7rajjr8bzm8pzpmc"; +in +stdenv.mkDerivation { + pname = "MacPass"; + inherit version; - src = fetchurl { - url = "https://github.com/MacPass/MacPass/releases/download/${version}/${pname}-${version}.zip"; - sha256 = "1gikixbrz1pvyjspp62msdmhjdy1rfkx8jhy7rajjr8bzm8pzpmc"; + src = fetchfromgh { + owner = "MacPass"; + repo = "MacPass"; + name = "MacPass-${version}.zip"; + inherit version sha256; }; unpackPhase = "${unzip}/bin/unzip $src"; diff --git a/pkgs/applications/mapsoft/2.nix b/pkgs/applications/mapsoft/2.nix @@ -20,13 +20,13 @@ , unzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "mapsoft2"; - version = "2020-06-22"; + version = "unstable-2020-06-22"; src = fetchFromGitHub { owner = "slazav"; - repo = pname; + repo = "mapsoft2"; rev = "3966f2bcb48fdb3a6b17af82dcd89276ee38f6d9"; sha256 = "0fk41wvpv7z99j0s7lh4aja8gn1wfm8qnmdwjh4592iz0009pjh3"; fetchSubmodules = true; diff --git a/pkgs/applications/mapsoft/default.nix b/pkgs/applications/mapsoft/default.nix @@ -29,9 +29,9 @@ , getopt }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "mapsoft"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.mapsoft.rev; src = sources.mapsoft; patches = [ ./0001-fix-build.patch ]; diff --git a/pkgs/applications/nnn-plugins/default.nix b/pkgs/applications/nnn-plugins/default.nix @@ -1,8 +1,8 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "nnn-plugins"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.nnn.rev; src = sources.nnn; phases = [ "installPhase" "fixupPhase" ]; diff --git a/pkgs/applications/openorienteering-mapper/default.nix b/pkgs/applications/openorienteering-mapper/default.nix @@ -16,17 +16,19 @@ , wrapQtAppsHook , qtimageformats , sources +, substituteAll }: -mkDerivation rec { +mkDerivation { pname = "OpenOrienteering-Mapper"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.mapper.rev; src = sources.mapper; - patches = [ + patches = (substituteAll { # See https://github.com/NixOS/nixpkgs/issues/86054 - ./fix-qttranslations-path.diff - ]; + src = ./fix-qttranslations-path.patch; + inherit qttranslations; + }); buildInputs = [ gdal @@ -41,11 +43,6 @@ mkDerivation rec { nativeBuildInputs = [ cmake doxygen ninja qttools ]; - postPatch = '' - substituteInPlace src/util/translation_util.cpp \ - --subst-var-by qttranslations ${qttranslations} - ''; - cmakeFlags = [ # Building the manual and bundling licenses fails # See https://github.com/NixOS/nixpkgs/issues/85306 diff --git a/pkgs/applications/openorienteering-mapper/fix-qttranslations-path.diff b/pkgs/applications/openorienteering-mapper/fix-qttranslations-path.patch diff --git a/pkgs/applications/redict/default.nix b/pkgs/applications/redict/default.nix @@ -15,9 +15,9 @@ , withI18n ? true }: -mkDerivation rec { +mkDerivation { pname = "redict"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.redict.rev; src = sources.redict; nativeBuildInputs = [ qmake pkgconfig ] ++ (lib.optional withI18n qttools); diff --git a/pkgs/applications/wireguard-statusbar/default.nix b/pkgs/applications/wireguard-statusbar/default.nix @@ -1,12 +1,17 @@ -{ stdenv, fetchurl, undmg }: - -stdenv.mkDerivation rec { - pname = "wireguard-statusbar"; +{ stdenv, fetchfromgh, undmg }: +let version = "1.24"; +in +stdenv.mkDerivation { + pname = "wireguard-statusbar"; + inherit version; - src = fetchurl { - url = "https://github.com/aequitas/macos-menubar-wireguard/releases/download/${version}/WireGuardStatusbar-${version}-117.dmg"; + src = fetchfromgh { + owner = "aequitas"; + repo = "macos-menubar-wireguard"; + name = "WireGuardStatusbar-${version}-117.dmg"; sha256 = "0zwd4wfxilify660vrcnniyxd0mr1df78n46xbij5mx2nyca2pbj"; + inherit version; }; preferLocalBuild = true; @@ -14,8 +19,8 @@ stdenv.mkDerivation rec { buildInputs = [ undmg ]; installPhase = '' - mkdir -p "$out/Applications/WireGuardStatusbar.app" - cp -R . "$out/Applications/WireGuardStatusbar.app" + mkdir -p $out/Applications/WireGuardStatusbar.app + cp -R . $out/Applications/WireGuardStatusbar.app ''; meta = with stdenv.lib; { diff --git a/pkgs/build-support/fetchfromgh/default.nix b/pkgs/build-support/fetchfromgh/default.nix @@ -0,0 +1,11 @@ +{ fetchurl }: + +{ owner, repo, version, name, ... } @ args: + +( + fetchurl ( + { + url = "https://github.com/${owner}/${repo}/releases/download/${version}/${name}"; + } // removeAttrs args [ "owner" "repo" "version" "name" ] + ) +) diff --git a/pkgs/build-support/fetchwebarchive/default.nix b/pkgs/build-support/fetchwebarchive/default.nix @@ -0,0 +1,11 @@ +{ fetchurl }: + +{ timestamp, url, ... } @ args: + +( + fetchurl ( + { + url = "https://web.archive.org/web/${timestamp}/${url}"; + } // removeAttrs args [ "timestamp" "url" ] + ) +) diff --git a/pkgs/data/dicts/huzheng/base.nix b/pkgs/data/dicts/huzheng/base.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pname, version, filename, sha256, description }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { inherit pname version; src = fetchurl { @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { }; installPhase = '' - install -dm755 "$out/share/goldendict/dictionaries/${pname}" - cp -a . "$out/share/goldendict/dictionaries/${pname}" + install -dm755 $out/share/goldendict/dictionaries/${pname} + cp -a . $out/share/goldendict/dictionaries/${pname} ''; preferLocalBuild = true; diff --git a/pkgs/data/dicts/huzheng/default.nix b/pkgs/data/dicts/huzheng/default.nix @@ -1,25 +1,27 @@ { callPackage }: - +let + version = "2.4.2"; +in { - cambridge = callPackage ./base.nix rec { + cambridge = callPackage ./base.nix { pname = "cambridge"; - version = "2.4.2"; + inherit version; filename = "stardict-Cambridge_Advanced_Learners_Dictionary_3th_Ed-${version}.tar.bz2"; description = "Cambridge Advanced Learners Dictionary 3th Ed. (En-En)"; sha256 = "0mqrf5fr6hx3bjy1brsggmkrii2xf497jkaj6zf1hjxnp0ijswgr"; }; - macmillan = callPackage ./base.nix rec { + macmillan = callPackage ./base.nix { pname = "macmillan"; - version = "2.4.2"; + inherit version; filename = "stardict-Macmillan_English_Dictionary-${version}.tar.bz2"; description = "Macmillan English Dictionary (En-En)"; sha256 = "1xg4xvxnni5vc371sd0bvskl1vly6p62q3c8r36bd2069ln7jy8r"; }; - webster = callPackage ./base.nix rec { + webster = callPackage ./base.nix { pname = "webster"; - version = "2.4.2"; + inherit version; filename = "stardict-Webster_s_Unabridged_3-${version}.tar.bz2"; description = "Webster's Third New International Dictionary, Unabridged (En-En)"; sha256 = "1gj33px44d4ywhnxv7x5hxvh43f8m7skwmhvc62ld0c50blrqi7a"; diff --git a/pkgs/data/dicts/wiktionary/base.nix b/pkgs/data/dicts/wiktionary/base.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, lang, version, sha256 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "wiktionary-${lang}"; inherit version; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { }; installPhase = '' - install -Dm644 *.{dict,idx,ifo} -t "$out/share/goldendict/dictionaries/wiktionary" + install -Dm644 *.{dict,idx,ifo} -t $out/share/goldendict/dictionaries/wiktionary ''; preferLocalBuild = true; diff --git a/pkgs/data/maps/freizeitkarte-osm/default.nix b/pkgs/data/maps/freizeitkarte-osm/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, unzip, country ? "FIN", lang ? "en" }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "freizeitkarte-osm"; version = "2020-04-06"; @@ -9,9 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0wnfxb02n7niaa4ma6w6gxkfqfg5w7achkq1l5cyjpnhgjzlsw94"; }; - nativeBuildInputs = [ unzip ]; - - unpackPhase = "unzip $src"; + unpackPhase = "${unzip}/bin/unzip $src"; dontConfigure = true; dontBuild = true; @@ -19,7 +17,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; installPhase = '' - install -Dm644 *.img -t "$out/share/qmapshack/Maps" + install -Dm644 *.img -t $out/share/qmapshack/Maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/maps/gpxsee-dem/default.nix b/pkgs/data/maps/gpxsee-dem/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, unzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gpxsee-dem"; version = "2014-05-25"; diff --git a/pkgs/data/maps/gpxsee-maps/default.nix b/pkgs/data/maps/gpxsee-maps/default.nix @@ -4,9 +4,9 @@ , mapboxApiKey ? "" }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gpxsee-maps"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.gpxsee-maps.rev; src = sources.gpxsee-maps; postPatch = '' @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { ''; installPhase = '' - install -dm755 "$out/share/gpxsee/maps" - cp -r World "$out/share/gpxsee/maps" + install -dm755 $out/share/gpxsee/maps + cp -r World $out/share/gpxsee/maps find $out -name "*.tpl" | xargs rm ''; diff --git a/pkgs/data/maps/hiblovgpsmap/default.nix b/pkgs/data/maps/hiblovgpsmap/default.nix @@ -1,18 +1,19 @@ { stdenv, fetchgdrive, unzip }: - -stdenv.mkDerivation rec { - pname = "hiblovgpsmap"; +let version = "2019-10-28"; + filename = "OV-Hib-Lov-${stdenv.lib.replaceStrings [ "-" ] [ "" ] version}-1.02.zip"; +in +stdenv.mkDerivation { + pname = "hiblovgpsmap"; + inherit version; src = fetchgdrive { id = "10aAOKY8U7TQvFvuWBkwTei9iP3-cUvoE"; sha256 = "1079bn8rkdfsbqivxkm3zi327k2i4k5p20rr2jw7gacfsvdk4954"; - name = "OV-Hib-Lov-${stdenv.lib.replaceStrings [ "-" ] [ "" ] version}-1.02.zip"; + name = filename; }; - nativeBuildInputs = [ unzip ]; - - unpackPhase = "unzip $src"; + unpackPhase = "${unzip}/bin/unzip $src"; dontConfigure = true; dontBuild = true; @@ -20,7 +21,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; installPhase = '' - install -Dm644 *.img -t "$out/share/gpxsee/maps" + install -Dm644 *.img -t $out/share/gpxsee/maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/maps/maptourist/default.nix b/pkgs/data/maps/maptourist/default.nix @@ -1,6 +1,6 @@ { stdenv, sources, unzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "maptourist"; version = sources.maptourist.version; src = sources.maptourist; diff --git a/pkgs/data/maps/mtk-suomi/default.nix b/pkgs/data/maps/mtk-suomi/default.nix @@ -1,6 +1,6 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "mtk-suomi"; version = sources.mtk-suomi.version; src = sources.mtk-suomi; diff --git a/pkgs/data/maps/opentopomap/default.nix b/pkgs/data/maps/opentopomap/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, unzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "opentopomap"; version = "2020-05-15"; @@ -9,9 +9,7 @@ stdenv.mkDerivation rec { sha256 = "130h349ja358qmdszq8lhfi0flskhrjcf65z1f9v4vmhf67wj719"; }; - nativeBuildInputs = [ unzip ]; - - unpackPhase = "unzip $src"; + unpackPhase = "${unzip}/bin/unzip $src"; dontConfigure = true; dontBuild = true; @@ -19,7 +17,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; installPhase = '' - install -Dm644 *.img -t "$out/share/qmapshack/Maps" + install -Dm644 *.img -t $out/share/qmapshack/Maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/maps/qmapshack-dem/default.nix b/pkgs/data/maps/qmapshack-dem/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, unzip, gdal }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "qmapshack-dem"; version = "2014-05-25"; diff --git a/pkgs/data/maps/qmapshack-onlinemaps/default.nix b/pkgs/data/maps/qmapshack-onlinemaps/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchzip }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "qmapshack-onlinemaps"; version = "2019-12-26"; @@ -11,8 +11,8 @@ stdenv.mkDerivation rec { }; installPhase = '' - install -dm755 "$out/share/qmapshack/Maps" - cp -r $src/* "$out/share/qmapshack/Maps" + install -dm755 $out/share/qmapshack/Maps + cp -r $src/* $out/share/qmapshack/Maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/maps/qmapshack-routinodb/default.nix b/pkgs/data/maps/qmapshack-routinodb/default.nix @@ -1,6 +1,6 @@ { stdenv, sources, routino }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "qmapshack-routinodb"; version = sources.geofabrik-russia-nwfd.version; srcs = [ @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { dontUnpack = true; installPhase = '' - install -dm755 "$out/share/qmapshack/Routino" + install -dm755 $out/share/qmapshack/Routino for src in $srcs; do ${routino}/bin/planetsplitter \ diff --git a/pkgs/data/maps/slazav/hr.nix b/pkgs/data/maps/slazav/hr.nix @@ -1,8 +1,8 @@ { stdenv, cgpsmapper, gmaptool, imagemagick, mapsoft, netpbm, zip, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "slazav-hr"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.map_hr.rev; src = sources.map_hr; patches = [ ./0001-fix-hr.patch ]; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; installPhase = '' - install -Dm644 hr.img -t "$out/share/gpxsee/maps" + install -Dm644 hr.img -t $out/share/gpxsee/maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/maps/slazav/podm.nix b/pkgs/data/maps/slazav/podm.nix @@ -1,8 +1,8 @@ { stdenv, cgpsmapper, gmaptool, imagemagick, mapsoft, netpbm, zip, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "slazav-podm"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.map_podm.rev; src = sources.map_podm; patches = [ ./0001-fix-podm.patch ]; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; installPhase = '' - install -Dm644 podm.img -t "$out/share/gpxsee/maps" + install -Dm644 podm.img -t $out/share/gpxsee/maps ''; meta = with stdenv.lib; { diff --git a/pkgs/data/themes/goldendict-themes/dark-theme.nix b/pkgs/data/themes/goldendict-themes/dark-theme.nix @@ -1,6 +1,6 @@ { stdenv, fetchgit }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "goldendict-dark-theme"; version = "2018-11-08"; @@ -13,8 +13,8 @@ stdenv.mkDerivation rec { dontBuild = true; installPhase = '' - install -Dm644 article-style.css $out/share/goldendict/styles/dark-theme/article-style.css - install -Dm644 qt-style.css $out/share/goldendict/styles/dark-theme/qt-style.css + install -Dm644 article-style.css -t $out/share/goldendict/styles/dark-theme + install -Dm644 qt-style.css -t $out/share/goldendict/styles/dark-theme ''; meta = with stdenv.lib; { diff --git a/pkgs/data/themes/qtpbfimageplugin-styles/default.nix b/pkgs/data/themes/qtpbfimageplugin-styles/default.nix @@ -1,15 +1,15 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "qtpbfimageplugin-styles"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.qtpbfimageplugin-styles.rev; src = sources.qtpbfimageplugin-styles; dontBuild = true; installPhase = '' - install -dm755 "$out/share/gpxsee/style" - cp -r Mapbox OpenMapTiles Tilezen "$out/share/gpxsee/style" + install -dm755 $out/share/gpxsee/style + cp -r Mapbox OpenMapTiles Tilezen $out/share/gpxsee/style ''; meta = with stdenv.lib; { diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -14,68 +14,70 @@ lib.makeScope newScope ( gpxsee = libsForQt5.callPackage ./applications/gpxsee { inherit sources; }; - librewolf = callPackage ./applications/librewolf {}; - macpass = callPackage ./applications/macpass {}; - mapsoft = callPackage ./applications/mapsoft {}; - mapsoft2 = callPackage ./applications/mapsoft/2.nix {}; - nnn-plugins = callPackage ./applications/nnn-plugins {}; + librewolf = callPackage ./applications/librewolf { }; + macpass = callPackage ./applications/macpass { }; + mapsoft = callPackage ./applications/mapsoft { }; + mapsoft2 = callPackage ./applications/mapsoft/2.nix { }; + nnn-plugins = callPackage ./applications/nnn-plugins { }; openorienteering-mapper = libsForQt5.callPackage ./applications/openorienteering-mapper { inherit sources; }; redict = libsForQt5.callPackage ./applications/redict { inherit sources; }; - wireguard-statusbar = callPackage ./applications/wireguard-statusbar {}; + wireguard-statusbar = callPackage ./applications/wireguard-statusbar { }; ### BUILD SUPPORT - fetchgdrive = callPackage ./build-support/fetchgdrive {}; + fetchfromgh = callPackage ./build-support/fetchfromgh { }; + fetchgdrive = callPackage ./build-support/fetchgdrive { }; + fetchwebarchive = callPackage ./build-support/fetchwebarchive { }; ### DATA - huzheng = callPackage ./data/dicts/huzheng {}; - wiktionary = callPackage ./data/dicts/wiktionary {}; - - gpsmap64 = callPackage ./data/firmwares/gpsmap64 {}; - - freizeitkarte-osm = callPackage ./data/maps/freizeitkarte-osm {}; - gpxsee-dem = callPackage ./data/maps/gpxsee-dem {}; - gpxsee-maps = callPackage ./data/maps/gpxsee-maps {}; - gpxsee-poi = callPackage ./data/maps/gpxsee-poi {}; - hiblovgpsmap = callPackage ./data/maps/hiblovgpsmap {}; - maptourist = callPackage ./data/maps/maptourist {}; - mtk-suomi = callPackage ./data/maps/mtk-suomi {}; - opentopomap = callPackage ./data/maps/opentopomap {}; - qmapshack-onlinemaps = callPackage ./data/maps/qmapshack-onlinemaps {}; - qmapshack-routinodb = callPackage ./data/maps/qmapshack-routinodb {}; - qmapshack-dem = callPackage ./data/maps/qmapshack-dem {}; - slazav-hr = callPackage ./data/maps/slazav/hr.nix {}; - slazav-podm = callPackage ./data/maps/slazav/podm.nix {}; + huzheng = callPackage ./data/dicts/huzheng { }; + wiktionary = callPackage ./data/dicts/wiktionary { }; + + gpsmap64 = callPackage ./data/firmwares/gpsmap64 { }; + + freizeitkarte-osm = callPackage ./data/maps/freizeitkarte-osm { }; + gpxsee-dem = callPackage ./data/maps/gpxsee-dem { }; + gpxsee-maps = callPackage ./data/maps/gpxsee-maps { }; + gpxsee-poi = callPackage ./data/maps/gpxsee-poi { }; + hiblovgpsmap = callPackage ./data/maps/hiblovgpsmap { }; + maptourist = callPackage ./data/maps/maptourist { }; + mtk-suomi = callPackage ./data/maps/mtk-suomi { }; + opentopomap = callPackage ./data/maps/opentopomap { }; + qmapshack-onlinemaps = callPackage ./data/maps/qmapshack-onlinemaps { }; + qmapshack-routinodb = callPackage ./data/maps/qmapshack-routinodb { }; + qmapshack-dem = callPackage ./data/maps/qmapshack-dem { }; + slazav-hr = callPackage ./data/maps/slazav/hr.nix { }; + slazav-podm = callPackage ./data/maps/slazav/podm.nix { }; goldendict-dark-theme = - callPackage ./data/themes/goldendict-themes/dark-theme.nix {}; - qtpbfimageplugin-styles = callPackage ./data/themes/qtpbfimageplugin-styles {}; + callPackage ./data/themes/goldendict-themes/dark-theme.nix { }; + qtpbfimageplugin-styles = callPackage ./data/themes/qtpbfimageplugin-styles { }; ### DEVELOPMENT / TOOLS - gef = callPackage ./development/tools/gef {}; + gef = callPackage ./development/tools/gef { }; ### DEVELOPMENT / LIBRARIES foma = callPackage ./development/libraries/foma { libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; - geographiclib = callPackage ./development/libraries/geographiclib {}; - hfst = callPackage ./development/libraries/hfst {}; + geographiclib = callPackage ./development/libraries/geographiclib { }; + hfst = callPackage ./development/libraries/hfst { }; libgarmin = callPackage ./development/libraries/libgarmin { automake = pkgs.automake111x; }; - libshell = callPackage ./development/libraries/libshell {}; + libshell = callPackage ./development/libraries/libshell { }; ### DEVELOPMENT / PERL MODULES perlPackages = ( - callPackage ./perl-packages.nix {} + callPackage ./perl-packages.nix { } ) // pkgs.perlPackages // { recurseForDerivations = false; }; @@ -85,7 +87,7 @@ lib.makeScope newScope ( cheetah3 = python3Packages.callPackage ./development/python-modules/cheetah3 { inherit sources; }; - click = python3Packages.callPackage ./development/python-modules/click {}; + click-6-7 = python3Packages.callPackage ./development/python-modules/click { }; gpxelevations = python3Packages.callPackage ./development/python-modules/gpxelevations { inherit sources; }; @@ -107,71 +109,72 @@ lib.makeScope newScope ( ### TOOLS - cfiles = callPackage ./tools/cfiles {}; - cgpsmapper = callPackage ./tools/geo/cgpsmapper {}; - csvquote = callPackage ./tools/text/csvquote {}; - csvtools = callPackage ./tools/text/csvtools {}; - datamaps = callPackage ./tools/geo/datamaps {}; - docker-reg-tool = callPackage ./tools/docker-reg-tool {}; + cfiles = callPackage ./tools/cfiles { }; + cgpsmapper = callPackage ./tools/geo/cgpsmapper { }; + csvquote = callPackage ./tools/text/csvquote { }; + csvtools = callPackage ./tools/text/csvtools { }; + datamaps = callPackage ./tools/geo/datamaps { }; + docker-reg-tool = callPackage ./tools/docker-reg-tool { }; elevation = python3Packages.callPackage ./tools/geo/elevation { - inherit sources click; - }; - gimgtools = callPackage ./tools/geo/gimgtools {}; - gmaptool = callPackage ./tools/geo/gmaptool {}; - gpx-layer = perlPackages.callPackage ./tools/geo/gpx-layer { inherit sources; + click = click-6-7; }; - gpxtools = callPackage ./tools/geo/gpxtools {}; - gt-bash-client = callPackage ./tools/dict/gt-bash-client {}; - lsdreader = python3Packages.callPackage ./tools/dict/lsdreader { + gimgtools = callPackage ./tools/geo/gimgtools { }; + gmaptool = callPackage ./tools/geo/gmaptool { }; + gpx-layer = perlPackages.callPackage ./tools/geo/gpx-layer { inherit sources; }; + gpxtools = callPackage ./tools/geo/gpxtools { }; + gt-bash-client = callPackage ./tools/dict/gt-bash-client { }; gt4gd = python3Packages.callPackage ./tools/dict/gt4gd { inherit sources; }; i18n-editor = callPackage ./tools/i18n-editor { jre = pkgs.jdk11; }; - imgdecode = callPackage ./tools/geo/imgdecode {}; - ish = callPackage ./tools/networking/ish {}; + imgdecode = callPackage ./tools/geo/imgdecode { }; + ish = callPackage ./tools/networking/ish { }; + lsdreader = python3Packages.callPackage ./tools/dict/lsdreader { + inherit sources; + }; morse-talk = python3Packages.callPackage ./tools/morse-talk { inherit sources; }; - musig = callPackage ./tools/audio/musig {}; + musig = callPackage ./tools/audio/musig { }; ocad2img = perlPackages.callPackage ./tools/geo/ocad2img { inherit cgpsmapper ocad2mp; }; - ocad2mp = callPackage ./tools/geo/ocad2mp {}; - odict = callPackage ./tools/dict/odict {}; - openmtbmap_openvelomap_linux = callPackage ./tools/geo/openmtbmap_openvelomap_linux {}; + ocad2mp = callPackage ./tools/geo/ocad2mp { }; + odict = callPackage ./tools/dict/odict { }; + openmtbmap = callPackage ./tools/geo/openmtbmap { }; osm2mp = perlPackages.callPackage ./tools/geo/osm2mp { inherit sources; inherit (perlPackages) GeoOpenstreetmapParser MatchSimple MathPolygon MathPolygonTree TreeR; }; - ptunnel = callPackage ./tools/networking/ptunnel {}; - sendmap20 = callPackage ./tools/geo/sendmap20 {}; + ptunnel = callPackage ./tools/networking/ptunnel { }; + sendmap20 = callPackage ./tools/geo/sendmap20 { }; stardict-tools = # Needed for nixos-19.09 if pkgs ? libmysql then callPackage ./tools/dict/stardict-tools { libmysqlclient = libmysql; } - else callPackage ./tools/dict/stardict-tools {}; + else callPackage ./tools/dict/stardict-tools { }; supermercado = python3Packages.callPackage ./tools/geo/supermercado { inherit sources mercantile; }; - supload = callPackage ./tools/supload {}; + supload = callPackage ./tools/supload { }; tpkutils = python3Packages.callPackage ./tools/geo/tpkutils { inherit sources mercantile pymbtiles; }; - xfractint = callPackage ./tools/xfractint {}; + xfractint = callPackage ./tools/xfractint { }; ### SERVERS - mbtileserver = callPackage ./servers/mbtileserver {}; - nakarte = callPackage ./servers/nakarte {}; - shavit = callPackage ./servers/shavit {}; + mbtileserver = callPackage ./servers/mbtileserver { }; + nakarte = callPackage ./servers/nakarte { }; + shavit = callPackage ./servers/shavit { }; ### MISC - embox = callPackage ./embox {}; + embox = callPackage ./embox { }; } ) diff --git a/pkgs/development/libraries/foma/default.nix b/pkgs/development/libraries/foma/default.nix @@ -1,8 +1,8 @@ { stdenv, bison, flex, libtool, ncurses, readline, zlib, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "foma"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.foma.rev; src = sources.foma; sourceRoot = "source/foma"; diff --git a/pkgs/development/libraries/geographiclib/default.nix b/pkgs/development/libraries/geographiclib/default.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "geographiclib"; +let version = "1.50.1"; +in +stdenv.mkDerivation { + pname = "geographiclib"; + inherit version; src = fetchurl { url = "mirror://sourceforge/geographiclib/GeographicLib-${version}.tar.gz"; diff --git a/pkgs/development/libraries/hfst/default.nix b/pkgs/development/libraries/hfst/default.nix @@ -1,8 +1,8 @@ { stdenv, autoreconfHook, bison, flex, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "hfst"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.hfst.rev; src = sources.hfst; nativeBuildInputs = [ autoreconfHook bison flex ]; diff --git a/pkgs/development/libraries/libgarmin/default.nix b/pkgs/development/libraries/libgarmin/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchsvn, autoconf, automake, libtool }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "libgarmin"; - version = "2008-12-27"; + version = "unstable-2008-12-27"; src = fetchsvn { url = "https://svn.code.sf.net/p/libgarmin/svn/libgarmin/dev"; diff --git a/pkgs/development/libraries/libshell/default.nix b/pkgs/development/libraries/libshell/default.nix @@ -8,9 +8,9 @@ , scdoc }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "libshell"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.libshell.rev; src = sources.libshell; nativeBuildInputs = [ help2man ]; diff --git a/pkgs/development/python-modules/cheetah3/default.nix b/pkgs/development/python-modules/cheetah3/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, sources }: -buildPythonPackage rec { +buildPythonPackage { pname = "cheetah3"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.cheetah3.rev; src = sources.cheetah3; doCheck = false; diff --git a/pkgs/development/python-modules/click/default.nix b/pkgs/development/python-modules/click/default.nix @@ -1,8 +1,10 @@ { stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }: - -buildPythonPackage rec { +let pname = "click"; version = "6.7"; +in +buildPythonPackage { + inherit pname version; src = fetchPypi { inherit pname version; @@ -18,15 +20,13 @@ buildPythonPackage rec { buildInputs = [ pytest ]; - checkPhase = '' - py.test tests - ''; + checkPhase = "py.test tests"; # https://github.com/pallets/click/issues/823 doCheck = false; meta = with stdenv.lib; { - homepage = http://click.pocoo.org/; + homepage = "http://click.pocoo.org/"; description = "Create beautiful command line interfaces in Python"; license = licenses.bsd3; }; diff --git a/pkgs/development/python-modules/gpxelevations/default.nix b/pkgs/development/python-modules/gpxelevations/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonApplication, python, requests, gpxpy, sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "gpxelevations"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.gpxelevations.rev; src = sources.gpxelevations; propagatedBuildInputs = [ requests gpxpy ]; diff --git a/pkgs/development/python-modules/mercantile/default.nix b/pkgs/development/python-modules/mercantile/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, click, pytest, hypothesis, sources }: -buildPythonPackage rec { +buildPythonPackage { pname = "mercantile"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.mercantile.rev; src = sources.mercantile; propagatedBuildInputs = [ click ]; diff --git a/pkgs/development/python-modules/mikatools/default.nix b/pkgs/development/python-modules/mikatools/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, requests, clint, sources }: -buildPythonPackage rec { +buildPythonPackage { pname = "mikatools"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.mikatools.rev; src = sources.mikatools; propagatedBuildInputs = [ requests clint ]; diff --git a/pkgs/development/python-modules/pyephem/default.nix b/pkgs/development/python-modules/pyephem/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, sources }: -buildPythonPackage rec { +buildPythonPackage { pname = "pyephem"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.pyephem.rev; src = sources.pyephem; meta = with lib; { diff --git a/pkgs/development/python-modules/pymbtiles/default.nix b/pkgs/development/python-modules/pymbtiles/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, pytest, sources }: -buildPythonPackage rec { +buildPythonPackage { pname = "pymbtiles"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.pymbtiles.rev; src = sources.pymbtiles; checkInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/python-hfst/default.nix b/pkgs/development/python-modules/python-hfst/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonPackage, hfst, swig }: -buildPythonPackage rec { +buildPythonPackage { pname = "python-hfst"; inherit (hfst) src version; diff --git a/pkgs/development/tools/gef/default.nix b/pkgs/development/tools/gef/default.nix @@ -9,10 +9,22 @@ , python3 , gdb }: +let + initGef = writeScript "init-gef" '' + source @out@/share/gef/gef.py + ''; -stdenv.mkDerivation rec { + gdbGef = writeScript "gdb-gef" ( + with stdenv.lib; '' + #!${runtimeShell} + export PATH="${makeBinPath [ procps binutils-unwrapped ]}:$PATH" + ${gdb}/bin/gdb -x @out@/share/gef/init-gef "$@" + '' + ); +in +stdenv.mkDerivation { pname = "gef"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.gef.rev; src = sources.gef; postPatch = '' @@ -25,18 +37,6 @@ 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 install -Dm644 ${initGef} $out/share/gef/init-gef diff --git a/pkgs/embox/default.nix b/pkgs/embox/default.nix @@ -9,18 +9,29 @@ , unzip , which }: - -stdenv.mkDerivation rec { - pname = "embox"; - version = stdenv.lib.substring 0 7 src.rev; - src = sources.embox; +let template = "arm/qemu"; cjson = fetchurl { - url = "http://download.embox.rocks/cJSONFiles.zip"; + url = "mirror://sourceforge/cjson/cJSONFiles.zip"; sha256 = "19qdsfq4r7gjr39lkjplz418gkl2xg5j5fpdz9phlxlbggnklqhd"; }; + runScript = writers.writeBash "run-embox" '' + ${qemu}/bin/qemu-system-arm \ + -M integratorcp \ + -kernel @out@/share/embox/images/embox.img \ + -m 256 \ + -net nic,netdev=n0,model=smc91c111,macaddr=AA:BB:CC:DD:EE:02 \ + -netdev tap,script=@out@/share/embox/scripts/qemu_start,downscript=@out@/share/embox/scripts/qemu_stop,,id=n0 \ + -nographic + ''; +in +stdenv.mkDerivation { + pname = "embox"; + version = stdenv.lib.substring 0 7 sources.embox.rev; + src = sources.embox; + patches = [ ./0001-fix-build.patch ]; nativeBuildInputs = [ @@ -41,17 +52,7 @@ stdenv.mkDerivation rec { preferLocalBuild = true; - installPhase = let - runScript = writers.writeBash "run-embox" '' - ${qemu}/bin/qemu-system-arm \ - -M integratorcp \ - -kernel @out@/share/embox/images/embox.img \ - -m 256 \ - -net nic,netdev=n0,model=smc91c111,macaddr=AA:BB:CC:DD:EE:02 \ - -netdev tap,script=@out@/share/embox/scripts/qemu_start,downscript=@out@/share/embox/scripts/qemu_stop,,id=n0 \ - -nographic - ''; - in '' + installPhase = '' mkdir -p $out/bin substitute ${runScript} $out/bin/run-embox --subst-var out chmod +x $out/bin/run-embox diff --git a/pkgs/servers/mbtileserver/default.nix b/pkgs/servers/mbtileserver/default.nix @@ -1,8 +1,8 @@ { lib, buildGoModule, sources }: -buildGoModule rec { +buildGoModule { pname = "mbtileserver"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.mbtileserver.rev; src = sources.mbtileserver; vendorSha256 = null; diff --git a/pkgs/servers/nakarte/default.nix b/pkgs/servers/nakarte/default.nix @@ -1,7 +1,9 @@ { stdenv, mkYarnPackage, sources, secretsConfig ? null }: - -mkYarnPackage rec { - name = "nakarte-${stdenv.lib.substring 0 7 src.rev}"; +let + version = stdenv.lib.substring 0 7 sources.nakarte.rev; +in +mkYarnPackage { + name = "nakarte-${version}"; src = sources.nakarte; postPatch = @@ -20,7 +22,7 @@ mkYarnPackage rec { distPhase = "true"; meta = with stdenv.lib; { - inherit (src) description homepage; + inherit (sources.nakarte) description homepage; license = licenses.mit; maintainers = with maintainers; [ sikmir ]; platforms = platforms.all; diff --git a/pkgs/servers/shavit/default.nix b/pkgs/servers/shavit/default.nix @@ -1,8 +1,8 @@ { lib, buildGoModule, fetchgit, sources }: -buildGoModule rec { +buildGoModule { pname = "shavit"; - version = "2020-03-14"; + version = "unstable-2020-03-14"; src = fetchgit { url = "https://git.sr.ht/~yotam/shavit"; diff --git a/pkgs/tools/audio/musig/default.nix b/pkgs/tools/audio/musig/default.nix @@ -1,8 +1,10 @@ { lib, buildGoModule, pkgconfig, portaudio, sources }: - -buildGoModule rec { +let + version = lib.substring 0 7 sources.musig.rev; +in +buildGoModule { pname = "musig"; - version = lib.substring 0 7 src.rev; + inherit version; src = sources.musig; vendorSha256 = "0ha1xjdwibm8543b4bx0xrbigngiiakksdc6mnp0mz5y6ai56pg5"; diff --git a/pkgs/tools/cfiles/default.nix b/pkgs/tools/cfiles/default.nix @@ -1,8 +1,8 @@ { stdenv, pkg-config, ncurses, w3m, ueberzug, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "cfiles"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.cfiles.rev; src = sources.cfiles; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/tools/dict/gt-bash-client/default.nix b/pkgs/tools/dict/gt-bash-client/default.nix @@ -1,12 +1,12 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gt-bash-client"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.gt-bash-client.rev; src = sources.gt-bash-client; installPhase = '' - install -Dm755 translate.sh "$out/bin/gt-bash-client" + install -Dm755 translate.sh $out/bin/gt-bash-client ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/dict/gt4gd/default.nix b/pkgs/tools/dict/gt4gd/default.nix @@ -1,10 +1,15 @@ -{ lib, buildPythonApplication, requests, sources -, withUI ? true, tkinter }: +{ lib +, buildPythonApplication +, requests +, sources +, withUI ? true +, tkinter +}: -buildPythonApplication rec { +buildPythonApplication { pname = "gt4gd"; - version = lib.substring 0 7 src.rev; - src = sources.google-translate-for-goldendict; + version = lib.substring 0 7 sources.gt4gd.rev; + src = sources.gt4gd; propagatedBuildInputs = [ requests ] ++ (lib.optional withUI tkinter); diff --git a/pkgs/tools/dict/lsdreader/default.nix b/pkgs/tools/dict/lsdreader/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonApplication, sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "lsdreader"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.lsdreader.rev; src = sources.lsdreader; doCheck = false; diff --git a/pkgs/tools/dict/odict/default.nix b/pkgs/tools/dict/odict/default.nix @@ -1,8 +1,8 @@ { lib, buildGoModule, sources }: -buildGoModule rec { +buildGoModule { pname = "odict"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.odict.rev; src = sources.odict; vendorSha256 = "083mvrgpv9hyfmi26sankv940qp0bmyr55jm33dx1ivhd2xhkg78"; diff --git a/pkgs/tools/dict/stardict-tools/default.nix b/pkgs/tools/dict/stardict-tools/default.nix @@ -10,9 +10,9 @@ , sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "stardict-tools"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.stardict-3.rev; src = sources.stardict-3; nativeBuildInputs = [ diff --git a/pkgs/tools/docker-reg-tool/default.nix b/pkgs/tools/docker-reg-tool/default.nix @@ -1,12 +1,12 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "docker-reg-tool"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.docker-reg-tool.rev; src = sources.docker-reg-tool; installPhase = '' - install -Dm755 docker_reg_tool "$out/bin/docker_reg_tool" + install -Dm755 docker_reg_tool -t $out/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/geo/cgpsmapper/default.nix b/pkgs/tools/geo/cgpsmapper/default.nix @@ -1,21 +1,22 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchwebarchive }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "cgpsmapper"; version = "0093c"; - src = fetchurl { - url = "https://web.archive.org/web/20160620102839if_/http://www.cgpsmapper.com/download/${pname}-static.gz"; + src = fetchwebarchive { + url = "http://cgpsmapper.com/download/cgpsmapper-static.gz"; + timestamp = "20160817191046"; sha256 = "0h2xjkzkg566bgvg8gbl1hmjjimv2xbhv2csd54naq1vqphqjchx"; }; sourceRoot = "."; - unpackCmd = "gunzip -c $curSrc > ${pname}-static"; + unpackCmd = "gunzip -c $curSrc > cgpsmapper-static"; dontBuild = true; dontFixup = true; - installPhase = "install -Dm755 ${pname}-static -t $out/bin"; + installPhase = "install -Dm755 cgpsmapper-static -t $out/bin"; meta = with stdenv.lib; { description = "GIS converter into GARMIN compatible format maps"; diff --git a/pkgs/tools/geo/datamaps/default.nix b/pkgs/tools/geo/datamaps/default.nix @@ -1,8 +1,8 @@ { stdenv, libpng, pkg-config, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "datamaps"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.datamaps.rev; src = sources.datamaps; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/tools/geo/elevation/default.nix b/pkgs/tools/geo/elevation/default.nix @@ -14,9 +14,9 @@ , sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "elevation"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.elevation.rev; src = sources.elevation; propagatedBuildInputs = [ fasteners future appdirs click ]; diff --git a/pkgs/tools/geo/gimgtools/default.nix b/pkgs/tools/geo/gimgtools/default.nix @@ -1,8 +1,8 @@ { stdenv, sources, libiconv }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gimgtools"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.gimgtools.rev; src = sources.gimgtools; buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { installPhase = '' for tool in gimginfo gimgfixcmd gimgxor gimgunlock gimgch gimgextract cmdc; do - install -Dm755 $tool $out/bin/$tool + install -Dm755 $tool -t $out/bin done ''; diff --git a/pkgs/tools/geo/gmaptool/default.nix b/pkgs/tools/geo/gmaptool/default.nix @@ -1,11 +1,14 @@ { stdenv, fetchzip }: - -stdenv.mkDerivation rec { - pname = "gmaptool"; +let version = "0.8.220"; + filename = "lgmt${stdenv.lib.replaceStrings [ "." ] [ "" ] version}.zip"; +in +stdenv.mkDerivation { + pname = "gmaptool"; + inherit version; src = fetchzip { - url = "https://www.gmaptool.eu/sites/default/files/lgmt${stdenv.lib.replaceStrings [ "." ] [ "" ] version}.zip"; + url = "https://www.gmaptool.eu/sites/default/files/${filename}"; sha256 = "0wf9ys52slf2hzmfl81d8754alfqiylsk7g5af3lxsiivd5284gy"; stripRoot = false; }; diff --git a/pkgs/tools/geo/gpx-layer/default.nix b/pkgs/tools/geo/gpx-layer/default.nix @@ -1,8 +1,8 @@ { lib, buildPerlPackage, XMLParser, sources }: -buildPerlPackage rec { +buildPerlPackage { pname = "gpx-layer"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.gpx-layer.rev; src = sources.gpx-layer; outputs = [ "out" ]; diff --git a/pkgs/tools/geo/gpxtools/default.nix b/pkgs/tools/geo/gpxtools/default.nix @@ -1,8 +1,8 @@ { stdenv, cmake, expat, exiv2, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "gpxtools"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.gpxtools.rev; src = sources.gpxtools; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/tools/geo/imgdecode/default.nix b/pkgs/tools/geo/imgdecode/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "imgdecode"; +let version = "1.1"; +in +stdenv.mkDerivation { + pname = "imgdecode"; + inherit version; src = fetchurl { - url = "mirror://sourceforge/garmin-img/${pname}-${version}.tar.gz"; + url = "mirror://sourceforge/garmin-img/imgdecode-${version}.tar.gz"; sha256 = "0rxrzvbpw6cbgq0fab7hy8n9jhp98x5y48i69jijxdhfyjivs02m"; }; @@ -17,7 +19,7 @@ stdenv.mkDerivation rec { configurePhase = "./configure || true"; installPhase = '' - install -Dm755 imgdecode -t "$out/bin" + install -Dm755 imgdecode -t $out/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/geo/ocad2img/default.nix b/pkgs/tools/geo/ocad2img/default.nix @@ -1,11 +1,11 @@ { lib, buildPerlPackage, fetchzip, dos2unix, cgpsmapper, ocad2mp, ModulePluggable, Tk }: -buildPerlPackage rec { +buildPerlPackage { pname = "ocad2img"; - version = "2009-10-11"; + version = "unstable-2009-10-11"; src = fetchzip { - url = "http://worldofo.com/div/${pname}.zip"; + url = "http://worldofo.com/div/ocad2img.zip"; sha256 = "0d5aryahl5662w65fpqa5camq1c0wlyrnxgsdqb7xsgmk1sivvmz"; stripRoot = false; }; diff --git a/pkgs/tools/geo/ocad2mp/default.nix b/pkgs/tools/geo/ocad2mp/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchsvn }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "ocad2mp"; - version = "2011-01-26"; + version = "unstable-2011-01-26"; src = fetchsvn { - url = "svn://svn.code.sf.net/p/${pname}/code/trunk/${pname}"; + url = "svn://svn.code.sf.net/p/ocad2mp/code/trunk/ocad2mp"; rev = "269"; sha256 = "1700apfsjd27q9jsvvr94mk7rd0x24ib3bkn4y8hak0zvknib563"; }; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ]; installPhase = '' - install -Dm755 Release/ocad2mp -t "$out/bin" + install -Dm755 Release/ocad2mp -t $out/bin install -Dm644 SYM.TXT $out/share/ocad2mp/sym.txt ''; diff --git a/pkgs/tools/geo/openmtbmap/0001-fix-path.patch b/pkgs/tools/geo/openmtbmap/0001-fix-path.patch @@ -0,0 +1,61 @@ +diff --git i/create_omtb_garmin_img.sh w/create_omtb_garmin_img.sh +index 03a0ae6..143260d 100755 +--- i/create_omtb_garmin_img.sh ++++ w/create_omtb_garmin_img.sh +@@ -90,20 +90,20 @@ elif [[ -n ${OMTB_EXE:t} ]]; then + usage + fi + +-GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) ${^path}/gmt(.N,@-.) ) ++GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) @gmaptool@/bin/gmt(.N,@-.) ) + GMT_CMD="${GMT_CMD[1]:a}" + # if wine exists, this expands into e.g. /usr/bin/wine, otherwhise it will remain as string =wine + # advantage over which wine is, that it outputs only one result, namely the executable that a call to wine on the CL would actually use + WINE_EXE==wine + + # NB: If mkgmap is not found, we fall back to using gmt later. +-MKGMAP=( ${ARGS_A[-m]}(.N,@-.) /usr/share/mkgmap/mkgmap.jar(.N,@-.) /usr/local/share/mkgmap/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap/mkgmap.jar(.N,@-.) ${^path}/mkgmap.jar(.N,@-.) ) ++MKGMAP=( ${ARGS_A[-m]}(.N,@-.) @mkgmap@/bin/mkgmap(.N,@-.) ) + MKGMAP="${MKGMAP[1]:a}" + +-if ! [[ -x =7z ]]; then +- print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr +- exit 3 +-fi ++#if ! [[ -x =7z ]]; then ++# print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr ++# exit 3 ++#fi + + + DESC="${OMTBORVELO}_${OMTB_NAME}" +@@ -116,7 +116,7 @@ else + [[ -n $ARGS_A[-o] ]] && {print "\nWarning: -o given but ${ARGS_A[-o]} is not a directory.\n Using ${OMTB_EXE:A:h} instead..\n"} + fi + +-if ! [[ ( -n $MKGMAP && -x =java ) || -x $WINE_EXE ]]; then ++if ! [[ ( -n $MKGMAP ) || -x $WINE_EXE ]]; then + print "\nERROR: either mkgmap (+java) or wine are required!" > /dev/stderr + exit 4 + fi +@@ -151,7 +151,7 @@ fi + FIMG_a=(${TMPDIR}/6<->.img(N[1])) + if [[ -z $FIMG_a ]] ; then + print "Extracting $OMTB_EXE ..." +- 7z e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1 ++ @p7zip@/bin/7z e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1 + #Check if extraction files are there + FIMG_a=(${TMPDIR}/6<->.img(N[1])) + [[ -z $FIMG_a ]] && {print "\nERROR: Could not find 6*.img file after extracting $OMTB_EXE" >/dev/stderr ; exit 1} +@@ -192,9 +192,9 @@ if [[ -n $MKGMAP ]]; then + print "Using mkgmap, building address search index..." + #java -Xmx1000M -jar mkgmap.jar --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp 6*.img 7*.img 01002468.TYP + if [[ $(grep MemTotal: /proc/meminfo | awk '{print $2}') -gt $((1024*1024*3)) ]]; then +- java -Xmx3000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 ++ $MKGMAP -Xmx3000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 + else +- java -Xmx1000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 ++ $MKGMAP -Xmx1000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 + fi + mv (#i)gmapsupp.img "${DSTFILENAME}" || exit 7 + else diff --git a/pkgs/tools/geo/openmtbmap/default.nix b/pkgs/tools/geo/openmtbmap/default.nix @@ -0,0 +1,26 @@ +{ stdenv, gmaptool, mkgmap, p7zip, zsh, sources, substituteAll }: + +stdenv.mkDerivation { + pname = "openmtbmap"; + version = stdenv.lib.substring 0 7 sources.openmtbmap.rev; + src = sources.openmtbmap; + + patches = (substituteAll { + src = ./0001-fix-path.patch; + inherit gmaptool mkgmap p7zip; + }); + + buildInputs = [ zsh ]; + + installPhase = '' + install -Dm755 create_omtb_garmin_img.sh $out/bin/create_omtb_garmin_img + ''; + + meta = with stdenv.lib; { + inherit (src) description homepage; + license = licenses.free; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.all; + skip.ci = true; + }; +} diff --git a/pkgs/tools/geo/openmtbmap_openvelomap_linux/0001-fix-path.patch b/pkgs/tools/geo/openmtbmap_openvelomap_linux/0001-fix-path.patch @@ -1,61 +0,0 @@ -diff --git i/create_omtb_garmin_img.sh w/create_omtb_garmin_img.sh -index 03a0ae6..143260d 100755 ---- i/create_omtb_garmin_img.sh -+++ w/create_omtb_garmin_img.sh -@@ -90,20 +90,20 @@ elif [[ -n ${OMTB_EXE:t} ]]; then - usage - fi - --GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) ${^path}/gmt(.N,@-.) ) -+GMT_CMD=( ${ARGS_A[-g]}(.N,@-.) %gmaptool%/bin/gmt(.N,@-.) ) - GMT_CMD="${GMT_CMD[1]:a}" - # if wine exists, this expands into e.g. /usr/bin/wine, otherwhise it will remain as string =wine - # advantage over which wine is, that it outputs only one result, namely the executable that a call to wine on the CL would actually use - WINE_EXE==wine - - # NB: If mkgmap is not found, we fall back to using gmt later. --MKGMAP=( ${ARGS_A[-m]}(.N,@-.) /usr/share/mkgmap/mkgmap.jar(.N,@-.) /usr/local/share/mkgmap/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap.jar(.N,@-.) /usr/share/java/mkgmap/mkgmap.jar(.N,@-.) ${^path}/mkgmap.jar(.N,@-.) ) -+MKGMAP=( ${ARGS_A[-m]}(.N,@-.) %mkgmap%/bin/mkgmap(.N,@-.) ) - MKGMAP="${MKGMAP[1]:a}" - --if ! [[ -x =7z ]]; then -- print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr -- exit 3 --fi -+#if ! [[ -x =7z ]]; then -+# print "\nERROR: 7z is not installed, but needed to extract openmtbmap downloads !" > /dev/stderr -+# exit 3 -+#fi - - - DESC="${OMTBORVELO}_${OMTB_NAME}" -@@ -116,7 +116,7 @@ else - [[ -n $ARGS_A[-o] ]] && {print "\nWarning: -o given but ${ARGS_A[-o]} is not a directory.\n Using ${OMTB_EXE:A:h} instead..\n"} - fi - --if ! [[ ( -n $MKGMAP && -x =java ) || -x $WINE_EXE ]]; then -+if ! [[ ( -n $MKGMAP ) || -x $WINE_EXE ]]; then - print "\nERROR: either mkgmap (+java) or wine are required!" > /dev/stderr - exit 4 - fi -@@ -151,7 +151,7 @@ fi - FIMG_a=(${TMPDIR}/6<->.img(N[1])) - if [[ -z $FIMG_a ]] ; then - print "Extracting $OMTB_EXE ..." -- 7z e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1 -+ %7z% e -y -o$TMPDIR ${OMTB_EXE} &>/dev/null || exit 1 - #Check if extraction files are there - FIMG_a=(${TMPDIR}/6<->.img(N[1])) - [[ -z $FIMG_a ]] && {print "\nERROR: Could not find 6*.img file after extracting $OMTB_EXE" >/dev/stderr ; exit 1} -@@ -192,9 +192,9 @@ if [[ -n $MKGMAP ]]; then - print "Using mkgmap, building address search index..." - #java -Xmx1000M -jar mkgmap.jar --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp 6*.img 7*.img 01002468.TYP - if [[ $(grep MemTotal: /proc/meminfo | awk '{print $2}') -gt $((1024*1024*3)) ]]; then -- java -Xmx3000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 -+ $MKGMAP -Xmx3000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 - else -- java -Xmx1000M -jar "$MKGMAP" --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 -+ $MKGMAP -Xmx1000M --family-id=$FID --index --description="$DESC" --series-name="$DESC" --family-name="$DESC" --show-profiles=1 --product-id=1 --gmapsupp [67]*.img 01002468.TYP || exit 7 - fi - mv (#i)gmapsupp.img "${DSTFILENAME}" || exit 7 - else diff --git a/pkgs/tools/geo/openmtbmap_openvelomap_linux/default.nix b/pkgs/tools/geo/openmtbmap_openvelomap_linux/default.nix @@ -1,30 +0,0 @@ -{ stdenv, gmaptool, mkgmap, p7zip, zsh, sources }: - -stdenv.mkDerivation rec { - pname = "openmtbmap_openvelomap_linux"; - version = stdenv.lib.substring 0 7 src.rev; - src = sources.openmtbmap_openvelomap_linux; - - patches = [ ./0001-fix-path.patch ]; - - buildInputs = [ gmaptool mkgmap p7zip zsh ]; - - postPatch = '' - substituteInPlace create_omtb_garmin_img.sh \ - --replace "%gmaptool%" "${gmaptool}" \ - --replace "%mkgmap%" "${mkgmap}" \ - --replace "%7z%" "${p7zip}/bin/7z" - ''; - - installPhase = '' - install -Dm755 create_omtb_garmin_img.sh "$out/bin/create_omtb_garmin_img" - ''; - - meta = with stdenv.lib; { - inherit (src) description homepage; - license = licenses.free; - maintainers = with maintainers; [ sikmir ]; - platforms = platforms.all; - skip.ci = true; - }; -} diff --git a/pkgs/tools/geo/osm2mp/default.nix b/pkgs/tools/geo/osm2mp/default.nix @@ -17,9 +17,9 @@ , YAML }: -buildPerlPackage rec { +buildPerlPackage { pname = "osm2mp"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.osm2mp.rev; src = sources.osm2mp; outputs = [ "out" ]; diff --git a/pkgs/tools/geo/sendmap20/default.nix b/pkgs/tools/geo/sendmap20/default.nix @@ -1,11 +1,12 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchwebarchive }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "sendmap20"; version = "4.2"; - src = fetchurl { - url = "https://web.archive.org/web/20160622234550if_/http://cgpsmapper.com/download/${pname}.gz"; + src = fetchwebarchive { + url = "http://cgpsmapper.com/download/sendmap20.gz"; + timestamp = "20160622234550"; sha256 = "08fm3q3qpirxd2l6rwffs2h997vk04bl4jvq8fbjlymrsmdlqx4s"; }; diff --git a/pkgs/tools/geo/supermercado/default.nix b/pkgs/tools/geo/supermercado/default.nix @@ -9,9 +9,9 @@ , sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "supermercado"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.supermercado.rev; src = sources.supermercado; patches = [ diff --git a/pkgs/tools/geo/tpkutils/default.nix b/pkgs/tools/geo/tpkutils/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonApplication, mercantile, pymbtiles, pytest, setuptools, six, sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "tpkutils"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.tpkutils.rev; src = sources.tpkutils; propagatedBuildInputs = [ mercantile pymbtiles setuptools six ]; diff --git a/pkgs/tools/i18n-editor/default.nix b/pkgs/tools/i18n-editor/default.nix @@ -1,15 +1,21 @@ -{ stdenv, fetchzip, jre, makeWrapper }: - -stdenv.mkDerivation rec { - pname = "i18n-editor"; +{ stdenv, fetchfromgh, unzip, jre, makeWrapper }: +let version = "2.0.0-beta.1"; +in +stdenv.mkDerivation { + pname = "i18n-editor"; + inherit version; - src = fetchzip { - url = "https://github.com/jcbvm/i18n-editor/releases/download/${version}/${pname}-${version}.zip"; - sha256 = "0hkxgmna22qwm72rwaj4l1rxnx1x93z4v843sz58fdfiqmiqjfy3"; - stripRoot = false; + src = fetchfromgh { + owner = "jcbvm"; + repo = "i18n-editor"; + name = "i18n-editor-${version}.zip"; + sha256 = "19p9p6h4kfv468frdsl88w4x3z4bnhlcnll21zw63xhccw55v0lj"; + inherit version; }; + unpackPhase = "${unzip}/bin/unzip $src"; + buildInputs = [ jre makeWrapper ]; installPhase = '' diff --git a/pkgs/tools/morse-talk/default.nix b/pkgs/tools/morse-talk/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonApplication, matplotlib, nose, sounddevice, sources }: -buildPythonApplication rec { +buildPythonApplication { pname = "morse-talk"; - version = lib.substring 0 7 src.rev; + version = lib.substring 0 7 sources.morse-talk.rev; src = sources.morse-talk; propagatedBuildInputs = [ matplotlib sounddevice ]; diff --git a/pkgs/tools/networking/ish/default.nix b/pkgs/tools/networking/ish/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "ish"; +let version = "0.2"; +in +stdenv.mkDerivation { + pname = "ish"; + inherit version; src = fetchurl { - url = "mirror://sourceforge/icmpshell/${pname}-v${version}.tar.gz"; + url = "mirror://sourceforge/icmpshell/ish-v${version}.tar.gz"; sha256 = "10jp7l0in91n5prc83ykma14r8wd6gyd1amzfi8jysw1jprc92qb"; }; @@ -16,7 +18,7 @@ stdenv.mkDerivation rec { makeFlags = [ "linux" ]; installPhase = '' - install -Dm755 ish ishd -t "$out/bin" + install -Dm755 ish ishd -t $out/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/networking/ptunnel/default.nix b/pkgs/tools/networking/ptunnel/default.nix @@ -1,8 +1,10 @@ { stdenv, fetchurl, libpcap }: - -stdenv.mkDerivation rec { - pname = "ptunnel"; +let version = "0.72"; +in +stdenv.mkDerivation { + pname = "ptunnel"; + inherit version; src = fetchurl { url = "https://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-${version}.tar.gz"; diff --git a/pkgs/tools/supload/default.nix b/pkgs/tools/supload/default.nix @@ -1,8 +1,8 @@ { stdenv, curl, file, coreutils, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "supload"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.supload.rev; src = sources.supload; buildInputs = [ curl file ]; diff --git a/pkgs/tools/text/csvquote/default.nix b/pkgs/tools/text/csvquote/default.nix @@ -1,15 +1,13 @@ { stdenv, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "csvquote"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.csvquote.rev; src = sources.csvquote; makeFlags = [ "BINDIR=$(out)/bin" ]; - preInstall = '' - mkdir -p "$out/bin" - ''; + preInstall = "mkdir -p $out/bin"; meta = with stdenv.lib; { inherit (src) description homepage; diff --git a/pkgs/tools/text/csvtools/default.nix b/pkgs/tools/text/csvtools/default.nix @@ -1,8 +1,8 @@ { stdenv, pcre, openssl, sources }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "csvtools"; - version = stdenv.lib.substring 0 7 src.rev; + version = stdenv.lib.substring 0 7 sources.csvtools.rev; src = sources.csvtools; buildInputs = [ pcre ]; @@ -13,13 +13,9 @@ stdenv.mkDerivation rec { doCheck = true; checkInputs = [ openssl ]; - preCheck = '' - patchShebangs . - ''; + preCheck = "patchShebangs ."; - preInstall = '' - mkdir -p "$out/bin" - ''; + preInstall = "mkdir -p $out/bin"; meta = with stdenv.lib; { inherit (src) description homepage; diff --git a/pkgs/tools/xfractint/default.nix b/pkgs/tools/xfractint/default.nix @@ -1,11 +1,13 @@ { stdenv, fetchurl, xlibsWrapper }: - -stdenv.mkDerivation rec { - pname = "xfractint"; +let version = "20.04p14"; +in +stdenv.mkDerivation { + pname = "xfractint"; + inherit version; src = fetchurl { - url = "https://fractint.org/ftp/current/linux/${pname}-${version}.tar.gz"; + url = "https://fractint.org/ftp/current/linux/xfractint-${version}.tar.gz"; sha256 = "0jdqr639z862qrswwk5srmv4fj5d7rl8kcscpn6mlkx4jvjmca0f"; };