diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-01-01 15:55:15 +0100 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2021-01-02 10:00:16 +0100 |
commit | 1c52824feda3e452470915c5b164b9223d8ccc46 (patch) | |
tree | 6a97c70067631a05ad4bc27aa9d54ca490ef49b1 /pkgs/development/ocaml-modules | |
parent | 84c3e129ccdddde7af35e534b0a3ce79f0e9a65d (diff) | |
download | nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar.gz nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar.bz2 nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar.lz nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar.xz nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.tar.zst nixlib-1c52824feda3e452470915c5b164b9223d8ccc46.zip |
ocamlPackages.sedlex_2: 2.1 -> 2.2
* use dune 2 * refactor fetching of dependencies (reduce duplication) * remove dune rule for data files before building since dune 2 doesn't like the symlinked data files if the rule is present
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/sedlex/2.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix index b1a892d5b804..927acc1819eb 100644 --- a/pkgs/development/ocaml-modules/sedlex/2.nix +++ b/pkgs/development/ocaml-modules/sedlex/2.nix @@ -14,28 +14,33 @@ then throw "sedlex is not available for OCaml ${ocaml.version}" else let + unicodeVersion = "12.1.0"; + baseUrl = "https://www.unicode.org/Public/${unicodeVersion}"; + DerivedCoreProperties = fetchurl { - url = "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt"; + url = "${baseUrl}/ucd/DerivedCoreProperties.txt"; sha256 = "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"; }; DerivedGeneralCategory = fetchurl { - url = "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt"; + url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt"; sha256 = "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"; }; PropList = fetchurl { - url = "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt"; + url = "${baseUrl}/ucd/PropList.txt"; sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"; }; in buildDunePackage rec { pname = "sedlex"; - version = "2.1"; + version = "2.2"; + + useDune2 = true; src = fetchFromGitHub { owner = "ocaml-community"; repo = "sedlex"; rev = "v${version}"; - sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"; + sha256 = "18dwl2is5j26z6b1c47b81wvcpxw44fasppdadsrs9vsw63rwcm3"; }; propagatedBuildInputs = [ @@ -43,6 +48,7 @@ buildDunePackage rec { ]; preBuild = '' + rm src/generator/data/dune ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt ln -s ${PropList} src/generator/data/PropList.txt |