|
4 | 4 | inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
|
5 | 5 | inputs.flake-utils.url = "github:numtide/flake-utils";
|
6 | 6 | inputs.CHaP = {
|
7 |
| - url = "github:input-output-hk/cardano-haskell-packages?ref=repo"; |
| 7 | + url = "github:IntersectMBO/cardano-haskell-packages?ref=repo"; |
8 | 8 | flake = false;
|
9 | 9 | };
|
10 | 10 | outputs = { self, nixpkgs, flake-utils, haskellNix, CHaP }:
|
|
26 | 26 | };
|
27 | 27 |
|
28 | 28 | overlays = [ haskellNix.overlay
|
| 29 | + (final: prev: { |
| 30 | + webkitgtk = final.webkitgtk_4_0; |
| 31 | + libsodium = with final; stdenv.mkDerivation rec { |
| 32 | + pname = "libsodium"; |
| 33 | + |
| 34 | + src = fetchGit { |
| 35 | + url = "https://github.com/IntersectMBO/libsodium"; |
| 36 | + rev = version; |
| 37 | + }; |
| 38 | + version = "dbb48cce5429cb6585c9034f002568964f1ce567"; |
| 39 | + |
| 40 | + nativeBuildInputs = [ autoreconfHook ]; |
| 41 | + |
| 42 | + configureFlags = [ "--enable-static" ] |
| 43 | + # Fixes a compilation failure: "undefined reference to `__memcpy_chk'". Note |
| 44 | + # that the more natural approach of adding "stackprotector" to |
| 45 | + # `hardeningDisable` does not resolve the issue. |
| 46 | + ++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector"; |
| 47 | + |
| 48 | + outputs = [ "out" "dev" ]; |
| 49 | + separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; |
| 50 | + |
| 51 | + enableParallelBuilding = true; |
| 52 | + |
| 53 | + doCheck = true; |
| 54 | + |
| 55 | + meta = with lib; { |
| 56 | + description = "A modern and easy-to-use crypto library - VRF fork"; |
| 57 | + homepage = "http://doc.libsodium.org/"; |
| 58 | + license = licenses.isc; |
| 59 | + maintainers = [ "tdammers" "nclarke" ]; |
| 60 | + platforms = platforms.all; |
| 61 | + }; |
| 62 | + }; |
| 63 | + }) |
29 | 64 | (final: prev: {
|
30 | 65 | hixProject =
|
31 | 66 | final.haskell-nix.project' {
|
|
34 | 69 | # This is used by `nix develop .` to open a shell for use with
|
35 | 70 | # `cabal`, `hlint` and `haskell-language-server`
|
36 | 71 | shell.tools = {
|
37 |
| - cabal = {} ; |
| 72 | + cabal = {}; |
38 | 73 | hlint = {};
|
39 | 74 | haskell-language-server = {};
|
40 | 75 | fourmolu = {};
|
41 | 76 | };
|
42 | 77 | # Non-Haskell shell tools go here
|
43 |
| - shell.buildInputs = with pkgs; [ |
| 78 | + shell.buildInputs = with final; [ |
44 | 79 | nixpkgs-fmt
|
45 | 80 | ];
|
| 81 | + # ???: Fix for `nix flake show --allow-import-from-derivation` |
| 82 | + evalSystem = "x86_64-linux"; |
46 | 83 | inputMap = { "https://chap.intersectmbo.org/" = CHaP; };
|
47 | 84 | };
|
48 | 85 | })
|
|
52 | 89 | flake = pkgs.hixProject.flake {};
|
53 | 90 | in flake // {
|
54 | 91 | legacyPackages = pkgs;
|
| 92 | + # Built by `nix build .` |
| 93 | + packages.default = flake.packages."atlas-cardano:lib:atlas-cardano"; |
55 | 94 | });
|
| 95 | + # --- Flake Local Nix Configuration ---------------------------- |
| 96 | + nixConfig = { |
| 97 | + # This sets the flake to use the IOG nix cache. |
| 98 | + # Nix should ask for permission before using it, |
| 99 | + # but remove it here if you do not want it to. |
| 100 | + extra-substituters = ["https://cache.iog.io"]; |
| 101 | + extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="]; |
| 102 | + allow-import-from-derivation = "true"; |
| 103 | + }; |
56 | 104 | }
|
0 commit comments