Compare commits
2 Commits
0dd41f4833
...
d3252333eb
| Author | SHA1 | Date | |
|---|---|---|---|
| d3252333eb | |||
| 2d0874fd1d |
25
pkgs/gf-rgl/default.nix
Normal file
25
pkgs/gf-rgl/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ stdenv
|
||||
, ghc
|
||||
, gf-core
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "gf-rgl";
|
||||
version = "20250812";
|
||||
src = fetchFromGitHub {
|
||||
owner = "GrammaticalFramework";
|
||||
repo = "gf-rgl";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-rqN5MV/XxChXC+Vs4aLIhRtyPQZNk0LQZ2TCdbd6wUw=";
|
||||
};
|
||||
buildInputs = [ ghc gf-core ];
|
||||
LC_ALL = "C.UTF-8";
|
||||
buildPhase = ''
|
||||
runghc Setup.hs build
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/gf/lib
|
||||
runghc Setup.hs copy --dest=$out/share/gf/lib
|
||||
'';
|
||||
})
|
||||
22
pkgs/gfWithPackages/default.nix
Normal file
22
pkgs/gfWithPackages/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, gf-core
|
||||
, makeWrapper
|
||||
, runCommandLocal
|
||||
}:
|
||||
|
||||
packages:
|
||||
|
||||
let
|
||||
opts = {
|
||||
passthru = {
|
||||
preferLocalBuild = true;
|
||||
inherit (gf-core) version meta;
|
||||
};
|
||||
};
|
||||
paths = lib.makeSearchPath "share/gf/lib" packages;
|
||||
in runCommandLocal "gf-with-rgl" opts ''
|
||||
. ${makeWrapper}/nix-support/setup-hook
|
||||
makeWrapper ${gf-core}/bin/gf $out/bin/gf \
|
||||
--prefix GF_LIB_PATH : ${paths}
|
||||
''
|
||||
Reference in New Issue
Block a user