git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit1c52824feda3e452470915c5b164b9223d8ccc46 authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> dateFri 1 Jan 2021, 15:55 (6 years ago) parent84c3e12
1 file changed+11−5
pkgs/development/ocaml-modules/sedlex/2.nix+11−5
pkgs/development/ocaml-modules/sedlex/2.nix+11−5
@@ -14,28 +14,33 @@ then throw "sedlex is not available for OCaml ${ocaml.version}"
1414else
1515
1616let
17+ unicodeVersion = "12.1.0";
18+ baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
19+
1720 DerivedCoreProperties = fetchurl {
18− url = "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt";
21+ url = "${baseUrl}/ucd/DerivedCoreProperties.txt";
1922 sha256 = "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6";
2023 };
2124 DerivedGeneralCategory = fetchurl {
22− url = "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt";
25+ url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt";
2326 sha256 = "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q";
2427 };
2528 PropList = fetchurl {
26− url = "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt";
29+ url = "${baseUrl}/ucd/PropList.txt";
2730 sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk";
2831 };
2932in
3033buildDunePackage rec {
3134 pname = "sedlex";
32− version = "2.1";
35+ version = "2.2";
36+
37+ useDune2 = true;
3338
3439 src = fetchFromGitHub {
3540 owner = "ocaml-community";
3641 repo = "sedlex";
3742 rev = "v${version}";
38− sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26";
43+ sha256 = "18dwl2is5j26z6b1c47b81wvcpxw44fasppdadsrs9vsw63rwcm3";
3944 };
4045
4146 propagatedBuildInputs = [
@@ -43,6 +48,7 @@ buildDunePackage rec {
4348 ];
4449
4550 preBuild = ''
51+ rm src/generator/data/dune
4652 ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt
4753 ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt
4854 ln -s ${PropList} src/generator/data/PropList.txt