-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
37 lines (28 loc) · 867 Bytes
/
Copy pathdefault.nix
File metadata and controls
37 lines (28 loc) · 867 Bytes
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
{ pkgs, python311Packages, fetchPypi, python3 }:
pkgs.stdenv.mkDerivation rec {
name = "ht_can_pkg";
src = ./PCAN_project;
buildInputs = [
(python311Packages.cantools.overridePythonAttrs (old: {
src = fetchPypi {
pname = "cantools";
version = "39.4.4";
hash = "sha256-bo6Ri2ZxpiqfOZBUbs5WI+Hetx3vsc74WplVrDAdqZ4=";
};
doCheck = false;
}))
(pkgs.callPackage ./mcap.nix { })
]; # Python as a build dependency
propagatedBuildInputs = buildInputs;
nativeBuildInputs = [ python3 ] ++ buildInputs;
# Define the build phase to execute the scripts
buildPhase = ''
python3 -m cantools convert hytech.sym hytech.dbc
'';
# Specify the output of the build process
# In this case, it will be the generated file
installPhase = ''
mkdir -p $out
mv hytech.dbc $out/hytech.dbc
'';
}