Closed fricklerhandwerk closed 1 year ago
@ngi-nix/moss is claiming this!
Thanks for the devshell! I still have an issue. If I try to load the yosys-ghdl plugin like this:
$ yosys
yosys> plugin -i /nix/store/wfhih024a3hcri75dzbhphw622ra3p0w-yosys-ghdl-2022.01.11/share/yosys/plugins/ghdl.so
ERROR: Can't load module `/nix/store/wfhih024a3hcri75dzbhphw622ra3p0w-yosys-ghdl-2022.01.11/share/yosys/plugins/ghdl.so': libgnat-10.so: cannot open shared object file: No such file or directory
Then it misses the mentioned library. How can you add shared library dependencies to the devshell? Also, how can the user get the path to the plugin to load (eg in a Makefile), so that the nix store location does not need to be hardcoded in the Makefile?
@hansfbaier thanks for the report. We'll look into fixing that and also your question about the path for the Makefile during our next mob session on Thursday
Yeah, seconding the thanks for the update. I wanted to look at using the upstream yosys plugins during our next mob (see: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/yosys/plugins/ghdl.nix)
Without having looked closely at the locally defined builds/versions, was there a reason for packaging separately outside of upstream?
I nead a special yosys version (0.17) as later versions trigger a non implemented feature in nextpnr-xilinx.
Thanks for the info, I see how you selectively pulled definitions in from upstream at the correct version. We ended up meeting for shorter than expected today, hoping to have more of an update when we meet this Saturday 🙂
@hansfbaier how are you starting running the dev shell? We tried the following on 2 different machines and were able to load the yosys-ghdl plugin successfully
[~/toolchain-nix]$ nix develop
[nix(openXC7)] yosys
/----------------------------------------------------------------------------\
| |
| yosys -- Yosys Open SYnthesis Suite |
| |
| Copyright (C) 2012 - 2020 Claire Xenia Wolf <claire@yosyshq.com> |
| |
| Permission to use, copy, modify, and/or distribute this software for any |
| purpose with or without fee is hereby granted, provided that the above |
| copyright notice and this permission notice appear in all copies. |
| |
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| |
\----------------------------------------------------------------------------/
Yosys 0.17 (git sha1 yosys-0.17, gcc 11.3.0 -fPIC -Os)
yosys> plugin -i /nix/store/wfhih024a3hcri75dzbhphw622ra3p0w-yosys-ghdl-2022.01.11/share/yosys/plugins/ghdl.so
yosys>
Yes, I also used nix develop, but on Ubuntu, not NixOS. Interesting, that is actually the main issue that nix set out to solve. I wonder why it fails on my machine.
We'll try debugging it on ubuntu during our next session
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
I found this with strace
:
openat(AT_FDCWD, "/nix/store/2j8jqmnd9l7plihhf713yf291c9vyqjm-glibc-2.35-224/lib/libgnat-10.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
I looked into the directory. I tlooks ok, except that libgnat does not exist there:
$ ls /nix/store/2j8jqmnd9l7plihhf713yf291c9vyqjm-glibc-2.35-224/lib
Mcrt1.o crti.o grcrt1.o libanl.so libc_malloc_debug.so libdl.so.2 libm.so.6 libnsl.so.1 libnss_db.so.2 libnss_hesiod.so.2 libresolv.so libthread_db.so locale
Scrt1.o crtn.o ld-linux-x86-64.so.2 libanl.so.1 libc_malloc_debug.so.0 libgcc_s.so libmemusage.so libnss_compat.so libnss_dns.so.2 libpcprofile.so libresolv.so.2 libthread_db.so.1 rcrt1.o
audit gconv libBrokenLocale.so libc.so libc_nonshared.a libgcc_s.so.1 libmvec.so libnss_compat.so.2 libnss_files.so.2 libpthread.so librt.so libutil.so
crt1.o gcrt1.o libBrokenLocale.so.1 libc.so.6 libdl.so libm.so libmvec.so.1 libnss_db.so libnss_hesiod.so libpthread.so.0 librt.so.1 libutil.so.1
If I do
sudo /nix/var/nix/profiles/default/bin/nix --extra-experimental-features nix-command store repair /nix/store/2j8jqmnd9l7plihhf713yf291c9vyqjm-glibc-2.35-224
it seems to reinstall the package, but libgnat is still not there.
@hansfbaier we tried a few different things but we are still having trouble reproducing your issue
we wanted to identify if the devshell was relying on a libgnat available in the outer NixOS. We did this by running nix develop -i
(-i for ignore environment). However, no issues loading the plugin.
We then tried to see if the issue was nix on ubuntu. On an ubuntu 22.04 install, we tried nix develop -i
and had no issues loading the plugin.
One interesting thing is that we also do not have libgnat
in our /nix/store/2j8jqmnd9l7plihhf713yf291c9vyqjm-glibc-2.35-224/lib
on ubuntu. In fact, if we run strace (either on the entire devshell with strace -f -o out.log nix develop -i
or even just on yosys once we're in the dev shell with strace -f -o out.log yosys
), we see libgnat
referred to in a completely different place
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/glibc-hwcaps/x86-64-v3/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/glibc-hwcaps/x86-64-v3", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/glibc-hwcaps/x86-64-v2/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/glibc-hwcaps/x86-64-v2", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/haswell/x86_64/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/haswell/x86_64", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/haswell/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/haswell", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/x86_64/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/x86_64", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/tls", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/haswell/x86_64/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/haswell/x86_64", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/haswell/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/haswell", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/x86_64/libgnat-12.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
361515 newfstatat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/x86_64", 0x7fffffffaa60, 0) = -1 ENOENT (No such file or directory)
361515 openat(AT_FDCWD, "/nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/adalib/libgnat-12.so", O_RDONLY|O_CLOEXEC) = 3
Also that it is looking for libgnat-12
in /nix/store/x8fwz375r3qkz79x1bgbaaykla8sk3s0-gnat-12.2.0
, while your errors show that it was trying to load libgnat-10
Honestly, we're kind of at a loss at what to try next. Can you tell us your nix --version
? We were able to get working dev shells on 2.15.1, 2.15.0 and 2.13. Also, we installed nix
using the determinate systems installer.
Thanks, sorry I can't do anything at the moment, my PC is defective and I have to figure out which part needs to be replaced.
Hmm, got by PC up and running again. Removed flake.lock, then it downloaded and recompiled everything, but I still have the same issue.
Ah, if I use the ghdl plugin from the same hash version as you, then it also works for me:
Yosys 0.17 (git sha1 yosys-0.17, gcc 11.3.0 -fPIC -Os)
yosys> plugin -i /nix/store/wfhih024a3hcri75dzbhphw622ra3p0w-yosys-ghdl-2022.01.11/share/yosys/plugins/ghdl.so
yosys>
So the question is, how does the user find the right path to the ghdl plugin? Can that be automated somehow?
@hansfbaier sorry to hear about your PC issues but I'm glad you have it running again. Could you tell us your nix version and also how you installed it?
If you're available to meet on video call sometime this week for a live debugging session, that might be next best option.
@albertchae I just got it working, by deleting flake.lock and using your hash for the yosys plugin.
@albertchae I have to add that the culprit is probably my active nix profile. When I tried a new user it works, but in my nix profile it does not.
$ nix profile list
0 flake:nixpkgs#legacyPackages.x86_64-linux.vscodium github:NixOS/nixpkgs/4a56ce9727a0c5478a836a0d8a8f641c5b9a3d5f#legacyPackages.x86_64-linux.vscodium /nix/store/m5m2z5hr4cdqdxir96p6620xx8mqqdnz-vscodium-1.80.2.23209
1 flake:nixpkgs#legacyPackages.x86_64-linux.librewolf github:NixOS/nixpkgs/0cb867999eec4085e1c9ca61c09b72261fa63bb4#legacyPackages.x86_64-linux.librewolf /nix/store/dxj6jzbd5ik01zpdqlw0lr4yppvvb9ik-librewolf-113.0-3
2 flake:nixpkgs#legacyPackages.x86_64-linux.github-desktop github:NixOS/nixpkgs/0cb867999eec4085e1c9ca61c09b72261fa63bb4#legacyPackages.x86_64-linux.github-desktop /nix/store/fwxqw86ba3r3yxxkhjypm30x5lrx6kdk-github-desktop-3.2.1
3 flake:nixpkgs#legacyPackages.x86_64-linux.helix github:NixOS/nixpkgs/3acb5c4264c490e7714d503c7166a3fde0c51324#legacyPackages.x86_64-linux.helix /nix/store/h24wygkxsrfwsyaxi35faxx3hfwdaqks-helix-23.05
4 flake:nixpkgs#legacyPackages.x86_64-linux.poetry github:NixOS/nixpkgs/0cb867999eec4085e1c9ca61c09b72261fa63bb4#legacyPackages.x86_64-linux.poetry /nix/store/plyy5cj3q364mzyjmczm95grsf8wpr6y-python3.10-poetry-1.4.2
5 flake:nixpkgs#legacyPackages.x86_64-linux.verilator github:NixOS/nixpkgs/0cb867999eec4085e1c9ca61c09b72261fa63bb4#legacyPackages.x86_64-linux.verilator /nix/store/my28m8asnxnrpj47d3hiznygsmaqv3rh-verilator-5.010
6 flake:nixpkgs#legacyPackages.x86_64-linux.lldb github:NixOS/nixpkgs/0cb867999eec4085e1c9ca61c09b72261fa63bb4#legacyPackages.x86_64-linux.lldb /nix/store/nc6534f8dbzf0m266yddwvngmvd5k2in-lldb-14.0.6
@albertchae No, it was not the profile, I narrowed it down: I had LD_LIBRARY_PATH set to /usr/local/lib. As soon as I remove that environment variable, it starts working. So the remaining question is: how does the user discover the proper path of the ghdl plugin for his current yosys version?
@albertchae Ah, I got that one too, the packages set the environment variable NIX_YOSYS_PLUGIN_DIRS
which contains the right path.
Many thanks!
I still get this issue though:
nix flake check
[...]
warning: flake output attribute 'overlay' is deprecated; use 'overlays.default' instead
error: Package ‘ghdl-mcode-2.0.0’ in /nix/store/qdmn9i1jly7b4glixk82ankridmha7ha-source/flake.nix:97 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
(Flake) command, `--impure` must be passed in order to read this
environment variable.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
@albertchae I forgot, there are still three packages missing from the current nix flake:
@hansfbaier we are looking into the 3 packages you said are missing. At least for prjxray
, it looks like it is defined here https://github.com/openXC7/toolchain-nix/blob/ee91979e8f164b5775b2d951689c26a7dd46a872/flake.nix#L329-L364 and the 2 binaries xc7frames2bit
and xc7patch
are available in the dev shell. Is there something specific missing from this project in the flake?
We'll look into adding prjxray-db
to the flake. What is expected here? Do we just want to make the files under artix7
, kintex7
, spartan7
, and zynq7
available on the path?
We'll also look into getting someone to review your fasm PR for nixpkgs.
@albertchae Yes, I overlooked prjxray, that is already done. Yes, the files under prjxray-db just need to be made available in the store, and we need an environment variable that points to it.
@albertchae Wait, prjxray-db is already installed as part of nextpnr-xilinx. Then we just would need an environment variable pointing to it.
@albertchae I will try the environment variable. fasm
would be the priority for you, because I cannot do that.
@albertchae OK, environment variable done. https://github.com/openXC7/toolchain-nix/commit/ea5955778e80c4b66a2dc28ce97b5e7f31cb99bf
@albertchae I found a bug in the pypy3 package. https://github.com/NixOS/nixpkgs/issues/251126 I need it to generate the chip databases.
@albertchae I will try the environment variable.
fasm
would be the priority for you, because I cannot do that.
This is for https://github.com/NixOS/nixpkgs/pull/224448 correct? We will try to ping people to review that for you, but I think it would be best to split it into 2 PRs (one to add yourself as a maintainer and the other to add fasm
). The first commit should just be to add yourself as a maintainer (see similar feedback https://github.com/NixOS/nixpkgs/pull/249880#issuecomment-1683434380). And the second commit should have the message python310Packages.fasm: init at 0.0.2.post100
. Can you link us those PRs after they are ready and we can try to ping the right people?
@albertchae Moment please, will make two PRs.
@albertchae OK done: https://github.com/NixOS/nixpkgs/pull/251333 I made a separate PR for the maintainer, but was told here to make one out of it: https://github.com/NixOS/nixpkgs/pull/224448
@hansfbaier oh sorry about the conflicting messaging about separate PRs, but looks like someone is actively reviewing the PR now 🎉
@albertchae I added a nix package with the pre built chip databases to the flake. Unfortunately I cannot see the environment variable from its setup hook in the devshell. What am I missing here? Also, I would like to call the builder with different arguments to create different flakes with the different FPGA families (artiz7, kintex7, spartan7 zynq7). What would be the best way to go about it? I also would like to make those optional. How would I want to do that?
Hey Hans, we are doing a holistic check in on the state of OpenXC7 as it related to the Summer of Nix program.
You've done the lion's share of the actual packaging in https://github.com/openXC7/toolchain-nix! We're happy to provide support, as it is related to the Summer of Nix program's goals, but besides the few PRs we contributed, we're unclear as to what remains to be packaged.
There's an opportunity to refactor some of the Nix code to be more upstreamable into nixpkgs, provided this refactoring aligns with the goals given to us for Summer of Nix (we have to verify this, any thoughts @fricklerhandwerk ?) we'd be happy to work on this.
Feel free to chat here, or we'd be happy to set up a short meeting if you'd like the chat over how Summer of Nix could best support further packaging.
@jleightcap Yes an effort towards upstreaming would be greatly appreciated, because that is where I have no experience whatsoever with.
@jleightcap I suggest @ngi-nix/moss to do the refactoring as you'll have enough experience to do it swiftly, and then hand over to @hansfbaier to make a PR to Nixpkgs to become a maintainer.
Nixpkgs has a freshly revamped contributor guide that should hopefully be fairly easy to follow if fixups are needed in the future. @hansfbaier ping me personally if you find issues with those, and I'll make sure you get questions answered and the documentation improved accordingly.
@jleightcap Some of the packages (yosys, nextpnr with ghdl plugins) I actually have copy pasted from upstream and modified to use the openXC7 repos.
@ngi-nix/moss began work today on refactoring each package into a form that is (ideally) upstreamable. See: https://github.com/openXC7/toolchain-nix/pull/4
@jleightcap @ngi-nix/moss Great, thanks!
@hansfbaier we decided to pull out formatting changes only to https://github.com/openXC7/toolchain-nix/pull/5 and then we had some additional questions for you in https://github.com/openXC7/toolchain-nix/pull/4#issuecomment-1728736343 that'll help us keep improving https://github.com/openXC7/toolchain-nix/pull/4
@hansfbaier we wanted to check in since we have less than 2 weeks left for summer of nix. From our understanding of the scope of this issue, our goal was to package the entire toolchain for OpenXC7 using Nix within https://github.com/openXC7/toolchain-nix. It seemed like you already had most of that in place, but we helped you add a devShell in https://github.com/openXC7/toolchain-nix/pull/2 and then helped refactor the Nix code to be more idiomatic (and thus hopefully closer to upstreamable) with https://github.com/openXC7/toolchain-nix/pull/3 https://github.com/openXC7/toolchain-nix/pull/5 and https://github.com/openXC7/toolchain-nix/pull/4.
We believe the last missing package/tool in the toolchain was fasm
which you called out in the README, so we have a PR to add this in https://github.com/openXC7/toolchain-nix/pull/6. Was there anything else you needed in the toolchain-nix
repo as part of the OpenXC7 toolchain, or would you say that merging this PR would complete the scope of work under Summer of Nix? We will open a separate thread (probably as an issue in toolchain-nix
repo) about continuing to try and upstream packages outside of Summer of Nix.
@albertchae Thanks, for the fasm changes. When I use the fasm package, I still get a warning message that the antlr parser is not available, which degrades performance:
python3
Python 3.10.11 (main, Apr 4 2023, 22:10:32) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fasm
/nix/store/7aplvxiy7r1nl7fa2rlp2r681pihjh52-python3.10-fasm/lib/python3.10/site-packages/fasm/parser/__init__.py:30: RuntimeWarning: Unable to import fast Antlr4 parser implementation.
ImportError: cannot import name tags
Falling back to the much slower pure Python textX based parser
implementation.
Getting the faster antlr parser can normally be done by installing the
required dependencies and then reinstalling the fasm package with:
pip uninstall
pip install -v fasm
warn(
>>>
Does the fasm package require the antlr4 package as a dependency?
Using the ANTLR4 parser is currently quite difficult given the state of both nixpkgs and fasm. ANTLR4 is not required because the textx
parser is available as a slower fallback.
If ANTRL4 support was useful for the toolchain, my general recommendation is to 'revive' the fasm repository somehow. I'd probably recommend forking the repository, as the current upstream seems abandoned; build system fixes exist on an umerged PR, for example.
We might be able to help with this, but I'd note this is likely outside of the Summer of Nix goals.
Does the fasm package require the antlr4 package as a dependency?
If the warning is really annoying, I'd suggest to patch out the offending lines so we can come to a conclusion here. Indeed we can't resolve an issue as deep as dealing with an unmaintained dependency.
@albertchae @fricklerhandwerk point taken, yes I agree.
@albertchae There is one item left, which puzzles me. Setting environment variables seems to work in prjxray-setup-hook.sh, but not in nextpnr-setup-hook.sh. I can see the variable from prjxray, but not from nextpnr in the devshell. Why might that be?
I also have another question: When I want to get the path of a package, I could:
nix eval --raw ".#nextpnr-xilinx-chipdb.spartan7.outPath"
but that only works inside the flake directory. If I want to use this in a Makefile I would either have to provide the path to the flake in the local file system, or use the GitHub URL. The latter is independend of the CWD, but requires me to be online. Is there a way to get the path in a CWD independent manner offline? One would be the setup hook, but that does not seem to work for nextpnr-xilinx and the chip databases.
Ah I found a way:
Free and open source FPGA toolchain for AMD/Xilinx Series 7 chips
This seems to be a non-trivial project with multiple dependencies. Break down into separate issues as needed.