commit 7a41aa4c53a14227153de13ec5f03ad18801a70e
parent 72bd059f55f874e555c5424dc37edf5bff2ab9c7
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Wed, 5 May 2021 16:28:13 +0300
Up
Diffstat:
6 files changed, 68 insertions(+), 100 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -1,18 +1,4 @@
{
- "elevation": {
- "branch": "master",
- "builtin": false,
- "date": "2020-12-27T22:12:39Z",
- "description": "Python script to download global terrain digital elevation models, SRTM 30m DEM and SRTM 90m DEM",
- "homepage": "http://elevation.bopen.eu",
- "owner": "bopen",
- "repo": "elevation",
- "rev": "6819b2931f5de412bd6b18bd07f1674f71fa35e5",
- "sha256": "16sywbifg0xb0fx1sscqsrbrj0phc91p4vvlsaj2h5mswd5x3bfj",
- "type": "tarball",
- "url": "https://github.com/bopen/elevation/archive/6819b2931f5de412bd6b18bd07f1674f71fa35e5.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"geofabrik-estonia": {
"builtin": false,
"sha256": "07gy3280arvkvfpm82aqcing1w7av6hq3crf5wxm66ipk2viwmg7",
@@ -107,20 +93,6 @@
"url": "https://github.com/xinebf/google-translate-for-goldendict/archive/37c2cf96fe5584d766211f72aa0f7002fe334168.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "hfst": {
- "branch": "master",
- "builtin": false,
- "date": "2021-02-12T15:17:27Z",
- "description": "Helsinki Finite-State Technology (library and application suite)",
- "homepage": "https://hfst.github.io",
- "owner": "hfst",
- "repo": "hfst",
- "rev": "1eafb28ffe9f843540aaf355bf7193cea963ccb0",
- "sha256": "0vkbsrwhiq3rm9nplxh5y3vpk3gvv09nqxnrqrxfvpp4sdm7vs30",
- "type": "tarball",
- "url": "https://github.com/hfst/hfst/archive/1eafb28ffe9f843540aaf355bf7193cea963ccb0.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"klogg": {
"branch": "master",
"builtin": false,
@@ -135,34 +107,6 @@
"url": "https://github.com/variar/klogg/archive/9bf68ff2c6f2290723cb2c0ca3b834a6a6290291.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "lazyscraper": {
- "branch": "master",
- "builtin": false,
- "date": "2020-05-19T11:50:13Z",
- "description": "Lazy helper tool to make easier scraping with simple tasks",
- "homepage": "https://github.com/ivbeg/lazyscraper",
- "owner": "ivbeg",
- "repo": "lazyscraper",
- "rev": "2e14bd829311cde19ef32d7f0e11c3c4a3c08e1b",
- "sha256": "02pix53f5j6g4vv2w7vj93jk6a10wld7kk6ichc04aacwq3ljy42",
- "type": "tarball",
- "url": "https://github.com/ivbeg/lazyscraper/archive/2e14bd829311cde19ef32d7f0e11c3c4a3c08e1b.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
- "lsdreader": {
- "branch": "master",
- "builtin": false,
- "date": "2018-12-28T12:22:11Z",
- "description": "decompile Lingvo LSD dictionary to DSL",
- "homepage": "https://github.com/sv99/lsdreader",
- "owner": "sv99",
- "repo": "lsdreader",
- "rev": "c78ab22e794f1fbfbc93ffb3ee7ae481f54dd8c2",
- "sha256": "039biv10772zrw6s8a0ydgv9z995gw13wgvsr514ck9s6icxyddx",
- "type": "tarball",
- "url": "https://github.com/sv99/lsdreader/archive/c78ab22e794f1fbfbc93ffb3ee7ae481f54dd8c2.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"map-hr": {
"branch": "master",
"builtin": false,
@@ -216,20 +160,6 @@
"url": "https://github.com/mapbox/mercantile/archive/d00e29330663d2ca8dc1f4056f92194286250b38.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
- "microjson": {
- "branch": "master",
- "builtin": false,
- "date": "2020-11-30T15:22:10Z",
- "description": "Tiny streaming json deserializer",
- "homepage": "https://github.com/semlanik/microjson",
- "owner": "semlanik",
- "repo": "microjson",
- "rev": "0d9f50e407cd117e56582faf0d99bfececc1b6ea",
- "sha256": "15nhvkrdq9mi8np1s3k65w92aksm3937v27cxhiws7ab35wqhh41",
- "type": "tarball",
- "url": "https://github.com/semlanik/microjson/archive/0d9f50e407cd117e56582faf0d99bfececc1b6ea.tar.gz",
- "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
- },
"odict": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/development/libraries/hfst/default.nix b/pkgs/development/libraries/hfst/default.nix
@@ -1,15 +1,21 @@
-{ lib, stdenv, autoreconfHook, bison, flex, sources }:
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, bison, flex }:
-stdenv.mkDerivation {
- pname = "hfst-unstable";
- version = lib.substring 0 10 sources.hfst.date;
+stdenv.mkDerivation rec {
+ pname = "hfst";
+ version = "3.15.4";
- src = sources.hfst;
+ src = fetchFromGitHub {
+ owner = "hfst";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-YOh9atPk3u16xtl2bBPY+4159/AFdnptqnngCHnWa24=";
+ };
nativeBuildInputs = [ autoreconfHook bison flex ];
meta = with lib; {
- inherit (sources.hfst) description homepage;
+ description = "Helsinki Finite-State Technology (library and application suite)";
+ homepage = "https://hfst.github.io";
license = licenses.gpl3;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/development/libraries/microjson/default.nix b/pkgs/development/libraries/microjson/default.nix
@@ -1,10 +1,15 @@
-{ lib, stdenv, cmake, gtest, sources }:
+{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
-stdenv.mkDerivation {
- pname = "microjson-unstable";
- version = lib.substring 0 10 sources.microjson.date;
+stdenv.mkDerivation rec {
+ pname = "microjson";
+ version = "0.1.0";
- src = sources.microjson;
+ src = fetchFromGitHub {
+ owner = "semlanik";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-6kGshpy0CDg/8z3unZvGs0Uh1gglZ7yrIGc9/X+M0i8=";
+ };
postPatch = ''
substituteInPlace tests/CMakeLists.txt \
@@ -18,7 +23,8 @@ stdenv.mkDerivation {
doCheck = true;
meta = with lib; {
- inherit (sources.microjson) description homepage;
+ description = "Tiny streaming json deserializer";
+ inherit (src.meta) homepage;
license = licenses.mit;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/dict/lsdreader/default.nix b/pkgs/dict/lsdreader/default.nix
@@ -1,15 +1,21 @@
-{ lib, python3Packages, sources }:
+{ lib, python3Packages, fetchFromGitHub }:
-python3Packages.buildPythonApplication {
- pname = "lsdreader-unstable";
- version = lib.substring 0 10 sources.lsdreader.date;
+python3Packages.buildPythonApplication rec {
+ pname = "lsdreader";
+ version = "0.2.14";
- src = sources.lsdreader;
+ src = fetchFromGitHub {
+ owner = "sv99";
+ repo = pname;
+ rev = "c78ab22e794f1fbfbc93ffb3ee7ae481f54dd8c2";
+ hash = "sha256-vTXfWTQ6TUZCyXo/PgJ/JaWf9mseKKQNz1+cA8KOKw0=";
+ };
doCheck = false;
meta = with lib; {
- inherit (sources.lsdreader) description homepage;
+ description = "Decompile Lingvo LSD dictionary to DSL";
+ inherit (src.meta) homepage;
license = licenses.free;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/misc/lazyscraper/default.nix b/pkgs/misc/lazyscraper/default.nix
@@ -1,17 +1,23 @@
-{ lib, python3Packages, sources }:
+{ lib, python3Packages, fetchFromGitHub }:
-python3Packages.buildPythonApplication {
- pname = "lazyscraper-unstable";
- version = lib.substring 0 10 sources.lazyscraper.date;
+python3Packages.buildPythonApplication rec {
+ pname = "lazyscraper";
+ version = "2020-05-19";
- src = sources.lazyscraper;
+ src = fetchFromGitHub {
+ owner = "ivbeg";
+ repo = pname;
+ rev = "2e14bd829311cde19ef32d7f0e11c3c4a3c08e1b";
+ hash = "sha256-gnhJB+ZMKQIYZNHMeRrlICgz5UhyHy72Js/I4kbp8Qo=";
+ };
propagatedBuildInputs = with python3Packages; [ click lxml requests ];
postInstall = "mv $out/bin/lscraper.py $out/bin/lscraper";
meta = with lib; {
- inherit (sources.lazyscraper) description homepage;
+ description = "Lazy helper tool to make easier scraping with simple tasks";
+ inherit (src.meta) homepage;
license = licenses.asl20;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;
diff --git a/pkgs/tools/geo/elevation/default.nix b/pkgs/tools/geo/elevation/default.nix
@@ -1,4 +1,5 @@
{ lib
+, fetchFromGitHub
, python3Packages
, click
, gnumake
@@ -6,14 +7,18 @@
, unzip
, gzip
, gdal
-, sources
}:
-python3Packages.buildPythonApplication {
- pname = "elevation-unstable";
- version = lib.substring 0 10 sources.elevation.date;
+python3Packages.buildPythonApplication rec {
+ pname = "elevation";
+ version = "1.1.3";
- src = sources.elevation;
+ src = fetchFromGitHub {
+ owner = "bopen";
+ repo = pname;
+ rev = version;
+ hash = "sha256-sZStJgToQtWYrBH1BjqxCUwQUT5dcAlyZwnb4aYga+4=";
+ };
propagatedBuildInputs = with python3Packages; [ fasteners appdirs click setuptools ];
@@ -34,8 +39,17 @@ python3Packages.buildPythonApplication {
checkInputs = with python3Packages; [ pytestCheckHook pytest-mock ];
+ postInstall = ''
+ install -Dm644 elevation/datasource.mk -t $out/lib/${python3Packages.python.libPrefix}/site-packages/elevation
+ '';
+
+ doInstallCheck = true;
+
+ installCheckPhase = "$out/bin/eio selfcheck";
+
meta = with lib; {
- inherit (sources.elevation) description homepage;
+ description = "Python script to download global terrain digital elevation models, SRTM 30m DEM and SRTM 90m DEM";
+ homepage = "http://elevation.bopen.eu/";
license = licenses.asl20;
maintainers = [ maintainers.sikmir ];
platforms = platforms.unix;