Skip to content

Commit

Permalink
default.nix: add system as input argument (#288)
Browse files Browse the repository at this point in the history
* Added a new argument to `default.nix`, `system`, as `builtins.currentSystem` is not available when using nix flakes (where in documentation it is described as "non-hermetic and impure": see https://nixos.wiki/wiki/Flakes). This change allows passing the system as argument and thus restores compatibility with nix flakes.
  • Loading branch information
7FM authored Nov 23, 2023
1 parent ee019fd commit 801d715
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{
system ? builtins.currentSystem,
pkgs ? import ./nix/pkgs.nix {},
gitignore-src ? import ./nix/gitignore.nix { inherit pkgs; },

Expand Down Expand Up @@ -58,7 +59,7 @@ with pkgs; with python3.pkgs; buildPythonPackage rec {
eqy
lighter
synlig-sv
] ++ (if builtins.currentSystem == "x86_64-linux" then [ys-ghdl] else []) ))
] ++ (if system == "x86_64-linux" then [ys-ghdl] else []) ))
opensta
openroad
klayout
Expand Down

0 comments on commit 801d715

Please sign in to comment.