about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/quartus-prime/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-20 12:31:50 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-20 12:32:25 +0100
commitb7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch)
treea6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/applications/editors/quartus-prime/default.nix
parent710028664e26e85cb831a869b3da9f6993902255 (diff)
parent0799f514b1cd74878174939df79ac60ca5036673 (diff)
downloadnixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst
nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/quartus-prime/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/editors/quartus-prime/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/editors/quartus-prime/default.nix b/nixpkgs/pkgs/applications/editors/quartus-prime/default.nix
index 538d3fb134ca..8275be235b43 100644
--- a/nixpkgs/pkgs/applications/editors/quartus-prime/default.nix
+++ b/nixpkgs/pkgs/applications/editors/quartus-prime/default.nix
@@ -117,6 +117,37 @@ in buildFHSEnv rec {
   passthru = {
     inherit unwrapped;
     tests = {
+      buildSof = runCommand "quartus-prime-lite-test-build-sof"
+        { nativeBuildInputs = [ quartus-prime-lite ];
+        }
+        ''
+          cat >mydesign.vhd <<EOF
+          library ieee;
+          use ieee.std_logic_1164.all;
+
+          entity mydesign is
+          port (
+              in_0: in std_logic;
+              in_1: in std_logic;
+              out_1: out std_logic
+          );
+          end mydesign;
+
+          architecture dataflow of mydesign is
+          begin
+              out_1 <= in_0 and in_1;
+          end dataflow;
+          EOF
+
+          quartus_sh --flow compile mydesign
+
+          if ! [ -f mydesign.sof ]; then
+              echo "error: failed to produce mydesign.sof" >&2
+              exit 1
+          fi
+
+          touch "$out"
+        '';
       questaEncryptedModel = runCommand "quartus-prime-lite-test-questa-encrypted-model" {} ''
         "${quartus-prime-lite}/bin/vlog" "${quartus-prime-lite.unwrapped}/questa_fse/intel/verilog/src/arriav_atoms_ncrypt.v"
         touch "$out"