-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathversat.nix
42 lines (36 loc) · 868 Bytes
/
versat.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
{ pkgs ? import (builtins.fetchTarball {
name = "nixos-22.11";
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11.tar.gz";
sha256 = "11w3wn2yjhaa5pv20gbfbirvjq6i3m7pqrq2msf0g7cv44vijwgw";
}){} ,
tweag ? import (builtins.fetchTarball {
name = "lib-filesets";
url = "https://github.com/tweag/nixpkgs/tarball/file-sets";
# sha256 = "";
}){} }:
let
fs = tweag.lib.fileset;
sourceFiles = (fs.union ./Makefile (fs.union ./config.mk ./software));
in
#fs.trace {} sourceFiles
pkgs.stdenv.mkDerivation rec {
pname = "versat";
version = "0.1";
src = fs.toSource{
root = ./.;
fileset = sourceFiles;
};
buildInputs = [
pkgs.gnumake
pkgs.verilator
];
enableParallelBuilding = true;
buildPhase = ''
make -j versat
'';
installPhase = ''
mkdir -p $out/bin
mv versat $out/bin
'';
dontStrip = true;
}