Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 51 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.CHaP = {
url = "github:input-output-hk/cardano-haskell-packages?ref=repo";
url = "github:IntersectMBO/cardano-haskell-packages?ref=repo";
flake = false;
};
outputs = { self, nixpkgs, flake-utils, haskellNix, CHaP }:
Expand All @@ -26,6 +26,41 @@
};

overlays = [ haskellNix.overlay
(final: prev: {
webkitgtk = final.webkitgtk_4_0;
libsodium = with final; stdenv.mkDerivation rec {
pname = "libsodium";

src = fetchGit {
url = "https://github.com/IntersectMBO/libsodium";
rev = version;
};
version = "dbb48cce5429cb6585c9034f002568964f1ce567";

nativeBuildInputs = [ autoreconfHook ];

configureFlags = [ "--enable-static" ]
# Fixes a compilation failure: "undefined reference to `__memcpy_chk'". Note
# that the more natural approach of adding "stackprotector" to
# `hardeningDisable` does not resolve the issue.
++ lib.optional stdenv.hostPlatform.isMinGW "CFLAGS=-fno-stack-protector";

outputs = [ "out" "dev" ];
separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";

enableParallelBuilding = true;

doCheck = true;

meta = with lib; {
description = "A modern and easy-to-use crypto library - VRF fork";
homepage = "http://doc.libsodium.org/";
license = licenses.isc;
maintainers = [ "tdammers" "nclarke" ];
platforms = platforms.all;
};
};
})
(final: prev: {
hixProject =
final.haskell-nix.project' {
Expand All @@ -34,16 +69,18 @@
# This is used by `nix develop .` to open a shell for use with
# `cabal`, `hlint` and `haskell-language-server`
shell.tools = {
cabal = {} ;
cabal = {};
hlint = {};
haskell-language-server = {};
# ghc-lib-parser doesnt compile with anything newer
fourmolu = "0.17.0.0";
};
# Non-Haskell shell tools go here
shell.buildInputs = with pkgs; [
shell.buildInputs = with final; [
nixpkgs-fmt
];
# ???: Fix for `nix flake show --allow-import-from-derivation`
evalSystem = "x86_64-linux";
inputMap = { "https://chap.intersectmbo.org/" = CHaP; };
};
})
Expand All @@ -53,5 +90,16 @@
flake = pkgs.hixProject.flake {};
in flake // {
legacyPackages = pkgs;
# Built by `nix build .`
packages.default = flake.packages."atlas-cardano:lib:atlas-cardano";
});
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
# This sets the flake to use the IOG nix cache.
# Nix should ask for permission before using it,
# but remove it here if you do not want it to.
extra-substituters = ["https://cache.iog.io"];
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
allow-import-from-derivation = "true";
};
}
Loading