Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nix flake #443

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
324 changes: 324 additions & 0 deletions flake.lock

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

29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
description = "Grammatical Framework's Resouce Grammar Library";

inputs.flake-utils.url = "github:numtide/flake-utils";

inputs.gf-core.url ="github:BeFunctional/gf-core?ref=tp_nix_flake";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably not be merged until GrammaticalFramework/gf-core#165 is merged and the urls are updated to use the official gf-core repo instead of a fork

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Will update this mr then.


outputs = { self, nixpkgs, flake-utils, gf-core }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
defaultPackage = pkgs.stdenv.mkDerivation {
name = "gf-rgl";
src = ./.;
buildInputs = [gf-core.packages.${system}.gf];
buildPhase = ''
mkdir -p build
./Setup.sh --dest=build
'';
installPhase = ''
mkdir -p $out
cp -r build/* $out
'';
};
}
);
}