Skip to content

Commit

Permalink
remove scripts from shell
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Dec 12, 2024
1 parent a8e0c67 commit 96c1ec6
Showing 1 changed file with 10 additions and 46 deletions.
56 changes: 10 additions & 46 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ let
# Devshell doesn't run setup hooks from other packages, so just extract
# the correct values of the environment variables from the haskell.nix
# shell and use those.
certEnv = pkgs.runCommand "cert-env"
{
nativeBuildInputs = cabalProject.shell.nativeBuildInputs;
buildInputs = cabalProject.shell.buildInputs;
}
''
echo "export COQPATH=$COQPATH" >> $out
echo "export OCAMLPATH=$OCAMLPATH" >> $out
echo "export CAML_LD_LIBRARY_PATH=$CAML_LD_LIBRARY_PATH" >> $out
echo "export OCAMLFIND_DESTDIR=$OCAMLFIND_DESTDIR" >> $out
'';

certEnv = pkgs.runCommand "cert-env" {
nativeBuildInputs = cabalProject.shell.nativeBuildInputs;
buildInputs = cabalProject.shell.buildInputs;
} ''
echo "export COQPATH=$COQPATH" >> $out
echo "export OCAMLPATH=$OCAMLPATH" >> $out
echo "export CAML_LD_LIBRARY_PATH=$CAML_LD_LIBRARY_PATH" >> $out
echo "export OCAMLFIND_DESTDIR=$OCAMLFIND_DESTDIR" >> $out
'';

linux-pkgs = lib.optionals pkgs.hostPlatform.isLinux [
# Needed to fix the frequency and governor of the CPU running the benchmarks
Expand All @@ -30,7 +27,6 @@ let
pkgs.papi
];


all-pkgs = [
repoRoot.nix.agda.agda-with-stdlib

Expand Down Expand Up @@ -75,45 +71,13 @@ let
pkgs.nodejs_20
];

in

{
in {
name = "plutus";


welcomeMessage = "🤟 \\033[1;34mWelcome to Plutus\\033[0m 🤟";


packages = lib.concatLists [ all-pkgs linux-pkgs ];


scripts.assemble-changelog = {
description = "Assembles the changelog for PACKAGE at VERSION";
exec = repoRoot.scripts."assemble-changelog.sh";
group = "changelog";
};


scripts.prepare-release = {
description = "Prepares to release PACKAGEs at VERSION";
exec = repoRoot.scripts."prepare-release.sh";
group = "changelog";
};


scripts.update-version = {
description = "Updates the version for PACKAGE to VERSION";
exec = repoRoot.scripts."update-version.sh";
group = "changelog";
};


shellHook = ''
${builtins.readFile certEnv}
${repoRoot.nix.agda.shell-hook-exports}
'';


preCommit = {
stylish-haskell.enable = true;
cabal-fmt.enable = true;
Expand Down

0 comments on commit 96c1ec6

Please sign in to comment.