-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
47 lines (41 loc) · 987 Bytes
/
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
{
description = "GNU toolchain of CargOS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = { self, nixpkgs }@inputs: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
in {
packages."${system}".default = pkgs.stdenv.mkDerivation {
pname = "riscv-gnu-toolchain";
version = "2024-04-20";
src = pkgs.fetchzip {
url = "https://github.com/carg-os/riscv-gnu-toolchain/releases/download/2024-04-20/riscv-gnu-toolchain.zip";
hash = "sha256-0d9rlH45+UW0vAEtrvt0eesqD55mNQrXkypX23VByWQ=";
};
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = with pkgs; [
elfutils
expat
flex
gmp
guile
libmpc
libz
mpfr
ncurses
python311
xxHash
isl_0_24
zstd
];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
};
};
}