-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
62 lines (61 loc) · 1.85 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
formatter = pkgs.nixfmt-rfc-style;
packages = rec {
default = pkgs.stdenv.mkDerivation {
name = "tom-thumb";
src = self;
inherit fasmg-z80;
INCLUDE = fasmg-z80;
nativeBuildInputs = with pkgs; [ fasmg ];
installPhase = ''
mkdir -p $out
cp *.8x* LICENSE $out
'';
};
fasmg-z80 = pkgs.stdenv.mkDerivation {
name = "fasmg-z80";
src = pkgs.fetchFromGitHub {
owner = "jacobly0";
repo = "fasmg-z80";
rev = "bfc0f7f04dee0aed5e77990626f1c2199a458d5c";
hash = "sha256-sEy5Z27elq9Hv0k3o/gWM+t/wIFGusf6miC+HpZGTJA=";
};
patchPhase = ''
patchShebangs ti83plus.sed
'';
installPhase = ''
mkdir -p $out
cp ${ti83plus-inc} ti83plus.inc
./ti83plus.sed
cp *.inc *.alm $out/
'';
};
ti83plus-inc = pkgs.stdenv.mkDerivation {
name = "ti83plus.inc";
src = pkgs.fetchurl {
url = "https://wikiti.brandonw.net/index.php?title=83Plus:OS:ti83plus.inc&oldid=10413&action=raw";
hash = "sha256-YQsE9ANqbAioMrxbzTKEK8wKX99wqhom0xm6bWF5HSw=";
};
dontUnpack = true;
installPhase = "cat $src | sed -E '1,/^== Content ==$/d;s,^ *</?(pre|nowiki)>,,' > $out";
};
};
}
);
}