fixing nix development and build environments

This commit is contained in:
2025-05-21 23:11:56 +01:00
parent 42cf9bd028
commit 257d91a432
6 changed files with 28 additions and 45 deletions

View File

@@ -11,13 +11,13 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
hsPkgs = pkgs.haskell.packages.ghc98;
in
{
packages.default = hsPkgs.callCabal2nix "p2prc" ./. {};
packages.default = pkgs.haskellPackages.callPackage ./project.nix {};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
cabal2nix
cabal-install
haskell.compiler.ghc98
zlib.dev

View File

@@ -0,0 +1,17 @@
{ mkDerivation, aeson, base, bytestring, directory, lib, process
, text
}:
mkDerivation {
pname = "p2prc";
version = "0.1.0.0";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bytestring directory process text
];
executableHaskellDepends = [ base ];
description = "P2PRC haskell library";
license = "unknown";
mainProgram = "p2prc";
}