finishing automated setup

This commit is contained in:
2025-06-02 00:07:53 +01:00
parent 01e19d9a8c
commit 27f4615cd1
2 changed files with 5 additions and 3 deletions

View File

@@ -97,8 +97,7 @@
sed -i 's/base.*$/base, p2prc/' "$PROJECT_DIR".cabal sed -i 's/base.*$/base, p2prc/' "$PROJECT_DIR".cabal
cabal2nix . > ./cabal.nix; cabal2nix . > ./cabal.nix;
cabal2nix . --shell > shell.nix
# TODO: add cabal2nix shell.nix generator
git add . git add .
clear clear
@@ -107,6 +106,8 @@
echo -e "cd $PROJECT_DIR\n" echo -e "cd $PROJECT_DIR\n"
echo -e "nix flake init -t github:akilan1999/p2p-rendering-computation#haskell" echo -e "nix flake init -t github:akilan1999/p2p-rendering-computation#haskell"
echo -e "nix develop"
echo -e "nix run"
''; '';
}; };

View File

@@ -28,7 +28,7 @@
devShells.default = pkgs.haskellPackages.shellFor { devShells.default = pkgs.haskellPackages.shellFor {
packages = p: [ packages = p: [
(p.callPackage ./cabal.nix { }) (p.callPackage ./shell.nix { })
]; ];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
@@ -41,6 +41,7 @@
# TODO: add cabal2nix shell command # TODO: add cabal2nix shell command
shellHook = '' shellHook = ''
cabal2nix . > ./cabal.nix cabal2nix . > ./cabal.nix
cabal2nix . --shell > ./shell.nix
''; '';
}; };
} }