Skip to content

Commit

Permalink
move default.nix up
Browse files Browse the repository at this point in the history
  • Loading branch information
jjts committed Oct 9, 2024
1 parent 1d79169 commit 5cefe4b
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 7 deletions.
80 changes: 79 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,82 @@
# SPDX-License-Identifier: MIT

{ pkgs ? import <nixpkgs> {} }:
import lib/scripts/default.nix { inherit pkgs; }

let
py2hwsw_commit = "a1931b8146efbef6ff8e094ffe4c281f16d68cd1"; # Replace with the desired commit.
py2hwsw_sha256 = "sha256-E46IgfVmHdVXiKuQs/ZgmaQHxdHEYDySkGtbx2bi+hs="; # Replace with the actual SHA256 hash.

py2hwsw = pkgs.python3.pkgs.buildPythonPackage rec {
pname = "py2hwsw";
version = py2hwsw_commit;

src = let
# Get local py2hwsw path from `PY2HWSW_PATH` env variable
py2hwswPath = builtins.getEnv "PY2HWSW_PATH";
in if py2hwswPath != "" then
pkgs.lib.cleanSource py2hwswPath
else
pkgs.fetchFromGitHub {
owner = "IObundle";
repo = "py2hwsw";
rev = py2hwsw_commit;
sha256 = py2hwsw_sha256;
};

# Add any necessary dependencies here.
#propagatedBuildInputs = [ pkgs.python38Packages.someDependency ];
};

# Hack to make Nix libreoffice wrapper work.
# This is because Nix wrapper breaks ghactions test by requiring the `/run/user/$(id -u)` folder to exist
libreofficeWithEnv = pkgs.writeShellScriptBin "soffice" ''
export DBUS_SESSION_BUS_ADDRESS="unix:path=/dev/null"
exec ${pkgs.libreoffice}/bin/soffice "$@"
'';

yosys = import ./yosys.nix { inherit pkgs; };
in

pkgs.mkShell {
name = "iob-shell";
buildInputs = with pkgs; [
bash
gnumake
verilog
verilator
gtkwave
python3
python3Packages.black
python3Packages.mypy
python3Packages.parse
python3Packages.numpy
python3Packages.wavedrom
python3Packages.matplotlib
python3Packages.scipy
python3Packages.pyserial
(texlive.combine { inherit (texlive) scheme-medium multirow lipsum catchfile nowidow enumitem placeins xltabular ltablex titlesec makecell datetime fmtcount comment textpos csquotes amsmath cancel listings hyperref biblatex; })
(callPackage ./riscv-gnu-toolchain.nix { })
verible
black
llvmPackages_14.clangUseLLVM
librsvg
libreofficeWithEnv
minicom # Terminal emulator
lrzsz # For Zmodem file transfers via serial connection of the terminal emulator
# Add Volare custom Python installation
(let
volareSrc = pkgs.fetchFromGitHub {
owner = "efabless";
repo = "volare";
rev = "47325949b87e857d75f81d306f02ebccf952cb15";
sha256 = "sha256-H9B/vZUs0O2jwmidCTMYhO0JY4DL+gmQNeVawaccvuU=";
};
in import "${volareSrc}" {
inherit pkgs;
})
yosys
gcc
libcap # Allows setting POSIX capabilities
py2hwsw
];
}
6 changes: 0 additions & 6 deletions lib/default.nix

This file was deleted.

0 comments on commit 5cefe4b

Please sign in to comment.