···2121, haskellLib
22222323, # hashes for downloading Hackage packages
2424+ # This is either a directory or a .tar.gz containing the cabal files and
2525+ # hashes of Hackage as exemplified by this repository:
2626+ # https://github.com/commercialhaskell/all-cabal-hashes/tree/hackage
2427 all-cabal-hashes
25282629, # compiler to use
···136139 cabal2nix --compiler=${self.ghc.haskellCompilerName} --system=${hostPlatform.config} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
137140 '';
138141142142+ # Given a package name and version, e.g. name = "async", version = "2.2.4",
143143+ # gives its cabal file and hashes (JSON file) as discovered from the
144144+ # all-cabal-hashes value. If that's a directory, it will copy the relevant
145145+ # files to $out; if it's a tarball, it will extract and move them to $out.
139146 all-cabal-hashes-component = name: version: buildPackages.runCommand "all-cabal-hashes-component-${name}-${version}" {} ''
140140- tar --wildcards -xzvf ${all-cabal-hashes} \*/${name}/${version}/${name}.{json,cabal}
141147 mkdir -p $out
142142- mv */${name}/${version}/${name}.{json,cabal} $out
148148+ if [ -d ${all-cabal-hashes} ]
149149+ then
150150+ cp ${all-cabal-hashes}/${name}/${version}/${name}.json $out
151151+ cp ${all-cabal-hashes}/${name}/${version}/${name}.cabal $out
152152+ else
153153+ tar --wildcards -xzvf ${all-cabal-hashes} \*/${name}/${version}/${name}.{json,cabal}
154154+ mv */${name}/${version}/${name}.{json,cabal} $out
155155+ fi
143156 '';
144157145158 hackage2nix = name: version: let component = all-cabal-hashes-component name version; in self.haskellSrc2nix {
···2828 # - favorites_default_to_git_if_not_defined: requires network access to github.com
2929 # - should_canonicalize: the test assumes that it will be called from the /Users/<project_dir>/ folder on darwin variant.
3030 checkFlags = [ "--skip favorites::favorites_default_to_git_if_not_defined" ]
3131- ++ lib.optionals stdenv.isDarwin [ "--skip git::should_canonicalize" ];
3131+ ++ lib.optionals stdenv.isDarwin [ "--skip git::utils::should_canonicalize" ];
32323333 meta = with lib; {
3434 description = "cargo, make me a project";
···105105 '';
106106107107 preBuild = ''
108108- if [[ -d vendor ]]; then make -o assets assets-compress plugins; fi
108108+ if [[ -d vendor ]]; then GOARCH= make -o assets assets-compress plugins; fi
109109 '';
110110111111 tags = [ "builtinassets" ];
+3-5
pkgs/servers/search/meilisearch/default.nix
···2323 # Default features include mini dashboard which downloads something from the internet.
2424 buildNoDefaultFeatures = true;
2525 buildInputs = lib.optionals stdenv.isDarwin [ Security DiskArbitration Foundation ];
2626- # Test fail at the moment.
2727- # > Test "create index" failed with error: "index wasn't created"
2828- # passthru.tests = {
2929- # meilisearch = nixosTests.meilisearch;
3030- # };
2626+ passthru.tests = {
2727+ meilisearch = nixosTests.meilisearch;
2828+ };
31293230 # Tests will try to compile with mini-dashboard features which downloads something from the internet.
3331 doCheck = false;