Skip to content
Draft
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ c-plus-plus.conf.sh
/make-setup/_tmp

CMakeLists.txt

.idea/
.direnv
.idea/
41 changes: 41 additions & 0 deletions flake.lock

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

39 changes: 39 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
inputs = {
utils.url = "github:numtide/flake-utils";
};

outputs = { self, utils, nixpkgs, ... }: utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
version = with builtins; head (match ".*VERSION=([[:digit:].]+).*" (readFile ./docs/setup.bash));
in {
defaultPackage = with pkgs; stdenv.mkDerivation {
name = "refal-5-lambda";
inherit version;

src = ./.;

dontStrip = true;

patchPhase = ''
runHook prePatchPhase
find -type f -exec sed -i '1,1s\#!/bin/bash\#!${pkgs.bash}/bin/bash\' '{}' ';'
runHook postPatchPhase
'';
buildPhase = ''
runHook preBuildPhase
./bootstrap.sh
runHook postBuildPhase
'';
installPhase = ''
runHook preInstallPhase
mkdir -p $out
mv bin lib c-plus-plus.conf.sh $out
runHook postInstallPhase
'';

};
});
}