Make ryfs a proper derivation, patch it's shebangs
This commit is contained in:
parent
27acaa51f8
commit
1a89d1e48e
19
flake.nix
19
flake.nix
|
@ -24,12 +24,24 @@
|
||||||
hash = "sha256-VQ/ABkiPMFZtA8XKLW2oQTihVkLmq5+gL8IVe5Kfv/I=";
|
hash = "sha256-VQ/ABkiPMFZtA8XKLW2oQTihVkLmq5+gL8IVe5Kfv/I=";
|
||||||
};
|
};
|
||||||
|
|
||||||
ryfs = pkgs.fetchFromGitHub {
|
ryfs = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "ryfs";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "ry755";
|
owner = "ry755";
|
||||||
repo = "ryfs";
|
repo = "ryfs";
|
||||||
rev = "e5034f4e11250a626388d7e9c1bcbf9af53f5702";
|
rev = "e5034f4e11250a626388d7e9c1bcbf9af53f5702";
|
||||||
hash = "sha256-wA89XLHhinxpiaKzGKKqLuRQ6Q4x4uw/NwGK8Hs2+MQ=";
|
hash = "sha256-wA89XLHhinxpiaKzGKKqLuRQ6Q4x4uw/NwGK8Hs2+MQ=";
|
||||||
};
|
};
|
||||||
|
dontBuild = true;
|
||||||
|
nativeBuildInputs = [ pkgs.python311 ];
|
||||||
|
# Not sure why we need to run patchShebangs manually, from what I can see in the docs it should patch all output scripts automatically -xenia
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ryfs.py $out/bin/ryfs.py
|
||||||
|
chmod u+x $out/bin/ryfs.py
|
||||||
|
patchShebangs --build $out/bin/ryfs.py
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
fox32os = pkgs.stdenv.mkDerivation {
|
fox32os = pkgs.stdenv.mkDerivation {
|
||||||
name = "fox32os";
|
name = "fox32os";
|
||||||
|
@ -44,7 +56,7 @@
|
||||||
FOX32ASM = "${asm}/bin/fox32asm";
|
FOX32ASM = "${asm}/bin/fox32asm";
|
||||||
GFX2INC = "${gfx2inc}/bin/gfx2inc";
|
GFX2INC = "${gfx2inc}/bin/gfx2inc";
|
||||||
OKAMERON = "${okameron}/okameron.lua";
|
OKAMERON = "${okameron}/okameron.lua";
|
||||||
RYFS = "${ryfs}/ryfs.py";
|
RYFS = "${ryfs}/bin/ryfs.py";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
|
@ -60,6 +72,7 @@
|
||||||
in rec {
|
in rec {
|
||||||
packages.fox32os = fox32os;
|
packages.fox32os = fox32os;
|
||||||
packages.fox32os-dev = fox32os-dev;
|
packages.fox32os-dev = fox32os-dev;
|
||||||
|
packages.ryfs = ryfs;
|
||||||
packages.default = fox32os;
|
packages.default = fox32os;
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
|
@ -68,7 +81,7 @@
|
||||||
export FOX32ASM="${asm}/bin/fox32asm";
|
export FOX32ASM="${asm}/bin/fox32asm";
|
||||||
export GFX2INC="${gfx2inc}/bin/gfx2inc";
|
export GFX2INC="${gfx2inc}/bin/gfx2inc";
|
||||||
export OKAMERON="${okameron}/okameron.lua";
|
export OKAMERON="${okameron}/okameron.lua";
|
||||||
export RYFS="${ryfs}/ryfs.py";
|
export RYFS="${ryfs}/bin/ryfs.py";
|
||||||
|
|
||||||
mkdir -p ./fox32rom
|
mkdir -p ./fox32rom
|
||||||
cp ${rom-dev}/dev/fox32rom.def ./fox32rom/fox32rom.def
|
cp ${rom-dev}/dev/fox32rom.def ./fox32rom/fox32rom.def
|
||||||
|
|
Loading…
Reference in New Issue
Block a user