diff options
Diffstat (limited to 'pkgs/applications/science/electronics')
15 files changed, 375 insertions, 121 deletions
diff --git a/pkgs/applications/science/electronics/dsview/default.nix b/pkgs/applications/science/electronics/dsview/default.nix index 98c35c37e8d5..ec53e976aec5 100644 --- a/pkgs/applications/science/electronics/dsview/default.nix +++ b/pkgs/applications/science/electronics/dsview/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, pkg-config, cmake, wrapQtAppsHook , libzip, boost, fftw, qtbase, qtwayland, qtsvg, libusb1 -, python3, fetchpatch +, python3, fetchpatch, desktopToDarwinBundle }: stdenv.mkDerivation rec { @@ -20,18 +20,19 @@ stdenv.mkDerivation rec { ./install.patch ]; - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; + nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ] + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; buildInputs = [ - boost fftw qtbase qtwayland qtsvg libusb1 libzip + boost fftw qtbase qtsvg libusb1 libzip python3 - ]; + ] ++ lib.optional stdenv.isLinux qtwayland; meta = with lib; { description = "A GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc"; homepage = "https://www.dreamsourcelab.com/"; license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ bachp ]; + platforms = platforms.unix; + maintainers = with maintainers; [ bachp carlossless ]; }; } diff --git a/pkgs/applications/science/electronics/dsview/install.patch b/pkgs/applications/science/electronics/dsview/install.patch index 9fd9133e2795..9fc660bf8148 100644 --- a/pkgs/applications/science/electronics/dsview/install.patch +++ b/pkgs/applications/science/electronics/dsview/install.patch @@ -16,8 +16,8 @@ index eb9be42..220817c 100644 - install(FILES DSView/DreamSourceLab.rules DESTINATION /etc/udev/rules.d RENAME 60-dreamsourcelab.rules) - endif() - -+ install(FILES DSView/DSView.desktop DESTINATION share/applications RENAME dsview.desktop) + install(FILES DSView/DreamSourceLab.rules DESTINATION etc/udev/rules.d RENAME 60-dreamsourcelab.rules) endif() ++install(FILES DSView/DSView.desktop DESTINATION share/applications RENAME dsview.desktop) install(FILES NEWS25 DESTINATION share/DSView RENAME NEWS25) diff --git a/pkgs/applications/science/electronics/fritzing/default.nix b/pkgs/applications/science/electronics/fritzing/default.nix index d5779abc2c6b..efe70f125d04 100644 --- a/pkgs/applications/science/electronics/fritzing/default.nix +++ b/pkgs/applications/science/electronics/fritzing/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchFromGitHub -, fetchpatch , wrapQtAppsHook , qmake , pkg-config @@ -9,47 +8,65 @@ , qtsvg , qttools , qtserialport +, qtwayland +, qt5compat , boost , libngspice , libgit2 , quazip +, clipper }: let # SHA256 of the fritzing-parts HEAD on the master branch, # which contains the latest stable parts definitions - partsSha = "4713511c894cb2894eae505b9307c6555afcc32c"; + partsSha = "015626e6cafb1fc7831c2e536d97ca2275a83d32"; parts = fetchFromGitHub { owner = "fritzing"; repo = "fritzing-parts"; rev = partsSha; - sha256 = "sha256-QiOGWc+99MJhOVrXyNOinR8rTVvW/E+wPfoB6QvbhY0="; + hash = "sha256-5jw56cqxpT/8bf1q551WG53J6Lw5pH0HEtRUoNNMc+A="; + }; + + # Header-only library + svgpp = fetchFromGitHub { + owner = "svgpp"; + repo = "svgpp"; + rev = "v1.3.0"; + hash = "sha256-kJEVnMYnDF7bThDB60bGXalYgpn9c5/JCZkRSK5GoE4="; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "fritzing"; - version = "unstable-2022-07-01"; + version = "1.0.2"; src = fetchFromGitHub { - owner = pname; + owner = "fritzing"; repo = "fritzing-app"; - rev = "40d23c29b0463d5c968c3c4b34ed5ffc05c5a258"; - sha256 = "sha256-smvfuxQWF/LMFFXHOKb3zUZsEet/XoiaxXOR5QMaYzw="; + rev = "dbdbe34c843677df721c7b3fc3e32c0f737e7e95"; + hash = "sha256-Xi5sPU2RGkqh7T+EOvwxJJKKYDhJfccyEZ8LBBTb2s4="; }; - buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip libngspice ]; nativeBuildInputs = [ qmake pkg-config qttools wrapQtAppsHook ]; - - patches = [ - (fetchpatch { - url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Quick-Dirty-patch-to-allow-finding-quazip-qt5-on-Arc.patch?h=fritzing&id=1ae0dc88464f375a54b156e6761315bcb04bcc1f"; - sha256 = "sha256-iS18EWw920gyeXDoHBRGwXvwMJurJS21H77Erl+fqog="; - }) + buildInputs = [ + qtbase + qtsvg + qtserialport + qtwayland + qt5compat + boost + libgit2 + quazip + libngspice + clipper ]; postPatch = '' + # Use packaged quazip, libgit and ngspice + sed -i "/pri\/quazipdetect.pri/d" phoenix.pro + sed -i "/pri\/spicedetect.pri/d" phoenix.pro substituteInPlace phoenix.pro \ --replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false' @@ -57,11 +74,19 @@ stdenv.mkDerivation rec { substituteInPlace src/fapplication.cpp \ --replace 'PartsChecker::getSha(dir.absolutePath());' '"${partsSha}";' + substituteInPlace phoenix.pro \ + --replace "6.5.10" "${qtbase.version}" + mkdir parts cp -a ${parts}/* parts/ ''; - env.NIX_CFLAGS_COMPILE = "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip"; + env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [ + "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}" + "-I${svgpp}/include" + "-I${clipper}/include/polyclipping" + ]; + env.NIX_LDFLAGS = "-lquazip1-qt${lib.versions.major qtbase.version}"; qmakeFlags = [ "phoenix.pro" diff --git a/pkgs/applications/science/electronics/gtkwave/default.nix b/pkgs/applications/science/electronics/gtkwave/default.nix index 3259f0f4ca95..7b7b54201bf7 100644 --- a/pkgs/applications/science/electronics/gtkwave/default.nix +++ b/pkgs/applications/science/electronics/gtkwave/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { pname = "gtkwave"; - version = "3.3.117"; + version = "3.3.118"; src = fetchurl { url = "mirror://sourceforge/gtkwave/${pname}-gtk3-${version}.tar.gz"; - sha256 = "sha256-PPFTdYapEcuwYBr4+hjPbacIyKFKcfac48uRGOhXHbk="; + sha256 = "sha256-D0MwwCiiqz0vTUzur222kl2wEMS2/VLRECLQ5d6gSGo="; }; nativeBuildInputs = [ pkg-config wrapGAppsHook ]; diff --git a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix index 51e1011b8a2f..6bdc197269cc 100644 --- a/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix +++ b/pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix @@ -44,6 +44,11 @@ let --replace "igraph_scg_grouping3" "" \ --replace "igraph_scg_semiprojectors2" "" ''; + NIX_CFLAGS_COMPILE = (prev.NIX_CFLAGS_COMPILE or []) ++ lib.optionals stdenv.cc.isClang [ + "-Wno-strict-prototypes" + "-Wno-unused-but-set-parameter" + "-Wno-unused-but-set-variable" + ]; # general options brought back from the old 0.9.x package buildInputs = prev.buildInputs ++ [ suitesparse ]; cmakeFlags = prev.cmakeFlags ++ [ "-DIGRAPH_USE_INTERNAL_CXSPARSE=OFF" ]; @@ -73,6 +78,12 @@ in stdenv.mkDerivation rec { url = "https://github.com/emsec/hal/commit/b639a56b303141afbf6731b70b7cc7452551f024.patch"; hash = "sha256-a7AyDEKkqdbiHpa4OHTRuP9Yewb3Nxs/j6bwez5m0yU="; }) + (fetchpatch { + name = "fix-gcc-13-build.patch"; + # https://github.com/emsec/hal/pull/557 + url = "https://github.com/emsec/hal/commit/831b1a7866aa9aabd55ff288c084862dc6a138d8.patch"; + hash = "sha256-kB/sJJtLGl5PUv+mmWVpee/okkJzp5HF0BCiCRCcTKw="; + }) ]; # make sure bundled dependencies don't get in the way - install also otherwise @@ -132,7 +143,6 @@ in stdenv.mkDerivation rec { ''; meta = with lib; { - broken = stdenv.isDarwin; description = "A comprehensive reverse engineering and manipulation framework for gate-level netlists"; homepage = "https://github.com/emsec/hal"; license = licenses.mit; diff --git a/pkgs/applications/science/electronics/kicad/base.nix b/pkgs/applications/science/electronics/kicad/base.nix index a2e5bbe72a56..bff63f3b2d7e 100644 --- a/pkgs/applications/science/electronics/kicad/base.nix +++ b/pkgs/applications/science/electronics/kicad/base.nix @@ -43,6 +43,7 @@ , valgrind , stable +, testing , baseName , kicadSrc , kicadVersion @@ -56,6 +57,8 @@ assert lib.assertMsg (!(sanitizeAddress && sanitizeThreads)) "'sanitizeAddress' and 'sanitizeThreads' are mutually exclusive, use one."; +assert testing -> !stable + -> throw "testing implies stable and cannot be used with stable = false"; let inherit (lib) optional optionals optionalString; @@ -74,9 +77,9 @@ stdenv.mkDerivation rec { ]; # tagged releases don't have "unknown" - # kicad nightlies use git describe --dirty + # kicad testing and nightlies use git describe --dirty # nix removes .git, so its approximated here - postPatch = lib.optionalString (!stable) '' + postPatch = lib.optionalString (!stable || testing) '' substituteInPlace cmake/KiCadVersion.cmake \ --replace "unknown" "${builtins.substring 0 10 src.rev}" @@ -92,7 +95,7 @@ stdenv.mkDerivation rec { ] ++ optionals (stable) [ # https://gitlab.com/kicad/code/kicad/-/issues/12491 - # should be resolved in the next release + # should be resolved in the next major? release "-DCMAKE_CTEST_ARGUMENTS='--exclude-regex;qa_eeschema'" ] ++ optional (stable && !withNgspice) "-DKICAD_SPICE=OFF" diff --git a/pkgs/applications/science/electronics/kicad/default.nix b/pkgs/applications/science/electronics/kicad/default.nix index c6c66839e4bc..fa0c7ae7a75e 100644 --- a/pkgs/applications/science/electronics/kicad/default.nix +++ b/pkgs/applications/science/electronics/kicad/default.nix @@ -2,22 +2,26 @@ , runCommand , newScope , fetchFromGitLab -, gnome -, dconf -, wxGTK32 -, gtk3 , makeWrapper -, gsettings-desktop-schemas -, hicolor-icon-theme +, symlinkJoin , callPackage , callPackages + +, gnome +, dconf +, gtk3 +, wxGTK32 , librsvg , cups +, gsettings-desktop-schemas +, hicolor-icon-theme + , unzip , jq , pname ? "kicad" , stable ? true +, testing ? false , withNgspice ? !stdenv.isDarwin , libngspice , withScripting ? true @@ -29,7 +33,6 @@ , with3d ? true , withI18n ? true , srcs ? { } -, symlinkJoin }: # `addons`: https://dev-docs.kicad.org/en/addons/ @@ -75,7 +78,9 @@ # } let - baseName = if (stable) then "kicad" else "kicad-unstable"; + baseName = if (testing) then "kicad-testing" + else if (stable) then "kicad" + else "kicad-unstable"; versionsImport = import ./versions.nix; # versions.nix does not provide us with version, src and rev. We @@ -118,7 +123,7 @@ let wxGTK = wxGTK32; python = python3; - wxPython = python.pkgs.wxPython_4_2; + wxPython = python.pkgs.wxpython; addonPath = "addon.zip"; addonsDrvs = map (pkg: pkg.override { inherit addonPath python3; }) addons; @@ -154,7 +159,7 @@ stdenv.mkDerivation rec { passthru.libraries = callPackages ./libraries.nix { inherit libSrc; }; passthru.callPackage = newScope { inherit addonPath python3; }; base = callPackage ./base.nix { - inherit stable baseName; + inherit stable testing baseName; inherit kicadSrc kicadVersion; inherit wxGTK python wxPython; inherit withNgspice withScripting withI18n; @@ -262,17 +267,16 @@ stdenv.mkDerivation rec { ln -s ${base}/share/metainfo $out/share/metainfo ''; - # can't run this for each pname - # stable and unstable are in the same versions.nix - # and kicad-small reuses stable - # with "all" it updates both, run it manually if you don't want that - # and can't git commit if this could be running in parallel with other scripts - passthru.updateScript = [ ./update.sh "all" ]; + passthru.updateScript = { + command = [ ./update.sh "${pname}" ]; + supportedFeatures = [ "commit" ]; + }; meta = rec { description = (if (stable) then "Open Source Electronics Design Automation suite" - else "Open Source EDA suite, development build") + else if (testing) then "Open Source EDA suite, latest on stable branch" + else "Open Source EDA suite, latest on master branch") + (lib.optionalString (!with3d) ", without 3D models"); homepage = "https://www.kicad.org/"; longDescription = '' diff --git a/pkgs/applications/science/electronics/kicad/update.sh b/pkgs/applications/science/electronics/kicad/update.sh index 625b2962fa23..b47e2d84b336 100755 --- a/pkgs/applications/science/electronics/kicad/update.sh +++ b/pkgs/applications/science/electronics/kicad/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils git nix curl +#!nix-shell -i bash -p coreutils git nix curl jq # shellcheck shell=bash enable=all set -e @@ -25,38 +25,63 @@ export TMPDIR=/tmp # if there is, default to commiting? # won't work when running in parallel? # remove items left in /nix/store? +# reuse hashes of already checked revs (to avoid redownloading testing's packages3d) + +# nixpkgs' update.nix passes in UPDATE_NIX_PNAME to indicate which package is being updated +# assigning a default value to that as shellcheck doesn't like the use of unassigned variables +: "${UPDATE_NIX_PNAME:=""}" +# update.nix can also parse JSON output of this script to formulate a commit +# this requires we collect the version string in the old versions.nix for the updated package +old_version="" +new_version="" + # get the latest tag that isn't an RC or *.99 latest_tags="$(git ls-remote --tags --sort -version:refname https://gitlab.com/kicad/code/kicad.git)" # using a scratch variable to ensure command failures get caught (SC2312) scratch="$(grep -o 'refs/tags/[0-9]*\.[0-9]*\.[0-9]*$' <<< "${latest_tags}")" scratch="$(grep -ve '\.99' -e '\.9\.9' <<< "${scratch}")" -scratch="$(head -n 1 <<< "${scratch}")" +scratch="$(sed -n '1p' <<< "${scratch}")" latest_tag="$(cut -d '/' -f 3 <<< "${scratch}")" -all_versions=( "${latest_tag}" master ) +# get the latest branch name for testing +branches="$(git ls-remote --heads --sort -version:refname https://gitlab.com/kicad/code/kicad.git)" +scratch="$(grep -o 'refs/heads/[0-9]*\.[0-9]*$' <<< "${branches}")" +scratch="$(sed -n '1p' <<< "${scratch}")" +testing_branch="$(cut -d '/' -f 3 <<< "${scratch}")" + +# "latest_tag" and "master" directly refer to what we want +# "testing" uses "testing_branch" found above +all_versions=( "${latest_tag}" testing master ) prefetch="nix-prefetch-url --unpack --quiet" clean="" check_stable="" +check_testing=1 check_unstable=1 commit="" -for arg in "$@"; do +for arg in "$@" "${UPDATE_NIX_PNAME}"; do case "${arg}" in help|-h|--help) echo "Read me!" >&2; exit 1; ;; - kicad|release|tag|stable|*small|5*|6*) check_stable=1; check_unstable="" ;; - all|both|full) check_stable=1; check_unstable=1 ;; + kicad|kicad-small|release|tag|stable|5*|6*|7*|8*) check_stable=1; check_testing=""; check_unstable="" ;; + *testing|kicad-testing-small) check_testing=1; check_unstable="" ;; + *unstable|*unstable-small|master|main) check_unstable=1; check_testing="" ;; + latest|now|today) check_unstable=1; check_testing=1 ;; + all|both|full) check_stable=1; check_testing=1; check_unstable=1 ;; + clean|fix|*fuck) check_stable=1; check_testing=1; check_unstable=1; clean=1 ;; commit) commit=1 ;; - clean|fix|*fuck) check_stable=1; check_unstable=1; clean=1 ;; - master|*unstable|latest|now|today) check_unstable=1 ;; *) ;; esac done here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -now=$(date --iso-8601 --utc) +commit_date() { + gitlab_json="$(curl -s https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/commits/"$1")" + commit_created="$(jq .created_at --raw-output <<< "${gitlab_json}")" + date --date="${commit_created}" --iso-8601 --utc +} file="${here}/versions.nix" # just in case this runs in parallel @@ -65,11 +90,7 @@ tmp="${here}/,versions.nix.${RANDOM}" libs=( symbols templates footprints packages3d ) get_rev() { - if [[ ${version} == "master" ]]; then - git ls-remote --heads "$@" - else - git ls-remote --tags "$@" - fi + git ls-remote "$@" } gitlab="https://gitlab.com/kicad" @@ -78,13 +99,14 @@ src_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/arch lib_pre="https://gitlab.com/api/v4/projects/kicad%2Flibraries%2Fkicad-" lib_mid="/repository/archive.tar.gz?sha=" +# number of items updated count=0 -printf "Latest tag is\t%s\n" "${latest_tag}" >&2 +printf "Latest tag is %s\n" "${latest_tag}" >&2 if [[ ! -f ${file} ]]; then echo "No existing file, generating from scratch" >&2 - check_stable=1; check_unstable=1; clean=1 + check_stable=1; check_testing=1; check_unstable=1; clean=1 fi printf "Writing %s\n" "${tmp}" >&2 @@ -97,32 +119,58 @@ printf "{\n" for version in "${all_versions[@]}"; do + src_version=${version}; + lib_version=${version}; + # testing is the stable branch on the main repo + # but the libraries don't have such a branch + # only the latest release tag and a master branch + if [[ ${version} == "testing" ]]; then + src_version=${testing_branch}; + lib_version=${latest_tag}; + fi + if [[ ${version} == "master" ]]; then pname="kicad-unstable" - today="${now}" + elif [[ ${version} == "testing" ]]; then + pname="kicad-testing" else pname="kicad" - today="${version}" fi + # skip a version if we don't want to check it - if [[ (${version} != "master" && -n ${check_stable}) \ - || (${version} == "master" && -n ${check_unstable}) ]]; then + if [[ (-n ${check_stable} && ${version} != "master" && ${version} != "testing") \ + || (-n ${check_testing} && ${version} == "testing") \ + || (-n ${check_unstable} && ${version} == "master" ) ]]; then + + now=$(commit_date "${src_version}") + + if [[ ${version} == "master" ]]; then + pname="kicad-unstable" + new_version="${now}" + elif [[ ${version} == "testing" ]]; then + pname="kicad-testing" + new_version="${testing_branch}-${now}" + else + pname="kicad" + new_version="${version}" + fi printf "\nChecking %s\n" "${pname}" >&2 printf "%2s\"%s\" = {\n" "" "${pname}" printf "%4skicadVersion = {\n" "" - printf "%6sversion =\t\t\t\"%s\";\n" "" "${today}" + printf "%6sversion =\t\t\t\"%s\";\n" "" "${new_version}" printf "%6ssrc = {\n" "" echo "Checking src" >&2 - scratch="$(get_rev "${gitlab}"/code/kicad.git "${version}")" + scratch="$(get_rev "${gitlab}"/code/kicad.git "${src_version}")" src_rev="$(cut -f1 <<< "${scratch}")" has_rev="$(grep -sm 1 "\"${pname}\"" -A 4 "${file}" | grep -sm 1 "${src_rev}" || true)" has_hash="$(grep -sm 1 "\"${pname}\"" -A 5 "${file}" | grep -sm 1 "sha256" || true)" + old_version="$(grep -sm 1 "\"${pname}\"" -A 3 "${file}" | grep -sm 1 "version" | awk -F "\"" '{print $2}' || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then - echo "Reusing old ${pname}.src.sha256, already latest .rev" >&2 + echo "Reusing old ${pname}.src.sha256, already latest .rev at ${old_version}" >&2 scratch=$(grep -sm 1 "\"${pname}\"" -A 5 "${file}") grep -sm 1 "rev" -A 1 <<< "${scratch}" else @@ -135,19 +183,19 @@ for version in "${all_versions[@]}"; do printf "%4s};\n" "" printf "%4slibVersion = {\n" "" - printf "%6sversion =\t\t\t\"%s\";\n" "" "${today}" + printf "%6sversion =\t\t\t\"%s\";\n" "" "${new_version}" printf "%6slibSources = {\n" "" for lib in "${libs[@]}"; do echo "Checking ${lib}" >&2 url="${gitlab}/libraries/kicad-${lib}.git" - scratch="$(get_rev "${url}" "${version}")" + scratch="$(get_rev "${url}" "${lib_version}")" scratch="$(cut -f1 <<< "${scratch}")" lib_rev="$(tail -n1 <<< "${scratch}")" has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)" has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256" || true)" if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then - echo "Reusing old kicad-${lib}-${today}.src.sha256, already latest .rev" >&2 + echo "Reusing old kicad-${lib}-${new_version}.src.sha256, already latest .rev" >&2 scratch="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}")" grep -sm 1 "${lib}" -A 1 <<< "${scratch}" else @@ -191,3 +239,22 @@ if [[ ${count} -gt 0 ]]; then else echo "No changes, those checked are up to date" >&2 fi + +# using UPDATE_NIX_ATTR_PATH to detect if this is being called from update.nix +# and output JSON to describe the changes +if [[ -n ${UPDATE_NIX_ATTR_PATH} ]]; then + + if [[ ${count} -eq 0 ]]; then echo "[{}]"; exit 0; fi + + jq -n \ + --arg attrpath "${UPDATE_NIX_PNAME}" \ + --arg oldversion "${old_version}" \ + --arg newversion "${new_version}" \ + --arg file "${file}" \ +'[{ + "attrPath": $attrpath, + "oldVersion": $oldversion, + "newVersion": $newversion, + "files": [ $file ] +}]' +fi diff --git a/pkgs/applications/science/electronics/kicad/versions.nix b/pkgs/applications/science/electronics/kicad/versions.nix index b938d1659553..11837638e1ab 100644 --- a/pkgs/applications/science/electronics/kicad/versions.nix +++ b/pkgs/applications/science/electronics/kicad/versions.nix @@ -3,23 +3,45 @@ { "kicad" = { kicadVersion = { - version = "7.0.9"; + version = "7.0.10"; src = { - rev = "1c81053cc40579ecd5febef1aeb1164008039deb"; - sha256 = "1hq9rba1gcks14zwbr8nbicpsil4imslgfch6ll33fhizbks3fq4"; + rev = "7daac78752749fc919e932be6156914aa83c926f"; + sha256 = "0z459yi0s02mwdgbr3xxw43gn9yjhvfkjnsxmns5mksgzsr5nmhh"; }; }; libVersion = { - version = "7.0.9"; + version = "7.0.10"; libSources = { - symbols.rev = "1ed4ed6c0696e50165b8e3d7978136a05db2d7c3"; - symbols.sha256 = "0ynsnjq3z126cjkgm1fjbjvdvpc0walnr42ya9dv46l27kxy2j77"; - templates.rev = "856bacc6782ea8c9bcb5a49a2d438a4689e0579b"; - templates.sha256 = "11582ldnv7hkljmhaym83962kixq1hjbfmdrn5laq7l4jk3l19vh"; - footprints.rev = "fe7b9aec7635caabbaa85fa8a15b85038394099b"; - footprints.sha256 = "16a4c2xs4i8wbm01a901yxabxk0qdsjkzlccfawddv82bkh4b87h"; - packages3d.rev = "5bc66f3c0f6dabf09df6c5188b8d955968500eab"; - packages3d.sha256 = "1cly28vc07i54v487zbb8d1h70nrd3naxvq146b0xnbrjwnd2q28"; + symbols.rev = "eedf6c9ddac2816023e817d4dc91032f9d7390b9"; + symbols.sha256 = "0nlgmxf9z1vf4g350dfkxql1dawgmw275wqxkgszsfxmhdfpmi9v"; + templates.rev = "9ce98cc45f3778e05c404edebf0f98de5c247ffe"; + templates.sha256 = "0mykfwwik7472i4r0isc5szj3dnmvd0538p0vlmzh4rcgj3pj3vm"; + footprints.rev = "7061fc9847ecc1b838e60dc6826db534028494f6"; + footprints.sha256 = "1az6fzh1lma71mj12bc4bblnmzjayrxhkb8w9rjvlhvvgv33cdmy"; + packages3d.rev = "d7345b34daaa23acf0d4506ed937fb424b5b18cd"; + packages3d.sha256 = "0xzyi4mgyifwc6dppdzh6jq294mkj0a71cwkqw2ymz1kfbksw626"; + }; + }; + }; + "kicad-testing" = { + kicadVersion = { + version = "7.0-2024-01-27"; + src = { + rev = "13fcb571f7e5bf4bf142d151651fc577aca32053"; + sha256 = "0wvk3wx5lm2jvyip6b96ja464hdzp9klb7b7ng5i3mdldabh0jba"; + }; + }; + libVersion = { + version = "7.0-2024-01-27"; + libSources = { + symbols.rev = "eedf6c9ddac2816023e817d4dc91032f9d7390b9"; + symbols.sha256 = "0nlgmxf9z1vf4g350dfkxql1dawgmw275wqxkgszsfxmhdfpmi9v"; + templates.rev = "9ce98cc45f3778e05c404edebf0f98de5c247ffe"; + templates.sha256 = "0mykfwwik7472i4r0isc5szj3dnmvd0538p0vlmzh4rcgj3pj3vm"; + footprints.rev = "7061fc9847ecc1b838e60dc6826db534028494f6"; + footprints.sha256 = "1az6fzh1lma71mj12bc4bblnmzjayrxhkb8w9rjvlhvvgv33cdmy"; + packages3d.rev = "d7345b34daaa23acf0d4506ed937fb424b5b18cd"; + packages3d.sha256 = "0xzyi4mgyifwc6dppdzh6jq294mkj0a71cwkqw2ymz1kfbksw626"; }; }; }; diff --git a/pkgs/applications/science/electronics/magic-vlsi/default.nix b/pkgs/applications/science/electronics/magic-vlsi/default.nix index 2e4ef8003d15..a6237be645b5 100644 --- a/pkgs/applications/science/electronics/magic-vlsi/default.nix +++ b/pkgs/applications/science/electronics/magic-vlsi/default.nix @@ -13,11 +13,11 @@ stdenv.mkDerivation rec { pname = "magic-vlsi"; - version = "8.3.454"; + version = "8.3.460"; src = fetchurl { url = "http://opencircuitdesign.com/magic/archive/magic-${version}.tgz"; - sha256 = "sha256-nHZJ2L54J2x+H7S29TeGPInTgjEhRFv3h2ki0ccGYB0="; + sha256 = "sha256-MiwwCVpbmEuGwY36/ctfD0xK4RL5tolM/YPSHLIzrgk="; }; nativeBuildInputs = [ python3 ]; @@ -50,6 +50,6 @@ stdenv.mkDerivation rec { description = "VLSI layout tool written in Tcl"; homepage = "http://opencircuitdesign.com/magic/"; license = licenses.mit; - maintainers = with maintainers; [ anna328p thoughtpolice AndersonTorres ]; + maintainers = with maintainers; [ thoughtpolice AndersonTorres ]; }; } diff --git a/pkgs/applications/science/electronics/nanovna-saver/default.nix b/pkgs/applications/science/electronics/nanovna-saver/default.nix index f65f5e5149ca..61788938e40a 100644 --- a/pkgs/applications/science/electronics/nanovna-saver/default.nix +++ b/pkgs/applications/science/electronics/nanovna-saver/default.nix @@ -7,13 +7,13 @@ }: python3.pkgs.buildPythonApplication rec { pname = "nanovna-saver"; - version = "0.6.0"; + version = "0.6.3"; src = fetchFromGitHub { owner = "NanoVNA-Saver"; repo = pname; - rev = "v${version}"; - sha256 = "sha256-2vDjAdEL8eNje5bm/1m+Fdi+PCGxpXwpxe2KvlLYB58="; + rev = "refs/tags/v${version}"; + sha256 = "sha256-lL6n3hcsIbLmrRKPi/ckWW2XUAtmBqvMSplkWOF4VKQ="; }; nativeBuildInputs = [ @@ -31,8 +31,6 @@ python3.pkgs.buildPythonApplication rec { setuptools-scm ]; - SETUPTOOLS_SCM_PRETEND_VERSION = version; - doCheck = false; dontWrapGApps = true; diff --git a/pkgs/applications/science/electronics/nvc/default.nix b/pkgs/applications/science/electronics/nvc/default.nix index 003de49a4915..378daf9c498c 100644 --- a/pkgs/applications/science/electronics/nvc/default.nix +++ b/pkgs/applications/science/electronics/nvc/default.nix @@ -7,7 +7,6 @@ , pkg-config , which , elfutils -, libelf , libffi , llvm , zlib @@ -16,13 +15,13 @@ stdenv.mkDerivation rec { pname = "nvc"; - version = "1.11.2"; + version = "1.11.3"; src = fetchFromGitHub { owner = "nickg"; repo = "nvc"; rev = "r${version}"; - hash = "sha256-qNnai2THSUyvtcnU5+Rdq+/EJe4HXw05bGTRz+wyXM8="; + hash = "sha256-Z4YxXPf8uKlASSK9v6fbtHtkUibc9EeA4i+3kD/vBmY="; }; nativeBuildInputs = [ @@ -40,8 +39,6 @@ stdenv.mkDerivation rec { zstd ] ++ lib.optionals stdenv.isLinux [ elfutils - ] ++ lib.optionals (!stdenv.isLinux) [ - libelf ]; preConfigure = '' diff --git a/pkgs/applications/science/electronics/openboardview/default.nix b/pkgs/applications/science/electronics/openboardview/default.nix index a750001d05db..9e498881d2e2 100644 --- a/pkgs/applications/science/electronics/openboardview/default.nix +++ b/pkgs/applications/science/electronics/openboardview/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, fetchpatch , gitUpdater , cmake , pkg-config @@ -27,6 +28,15 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ + # Fix gcc-13 build failure + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/OpenBoardView/OpenBoardView/commit/b03d0f69ec1611f5eb93f81291b4ba8c58cd29eb.patch"; + hash = "sha256-Hp7KgzulPC2bPtRsd6HJrTLu0oVoQEoBHl0p2DcOLQw="; + }) + ]; + nativeBuildInputs = [ cmake pkg-config python3 wrapGAppsHook ]; buildInputs = [ SDL2 fontconfig gtk3 ] ++ lib.optionals stdenv.isDarwin [ Cocoa diff --git a/pkgs/applications/science/electronics/pulseview/default.nix b/pkgs/applications/science/electronics/pulseview/default.nix index 7472fa30e7ff..cab42731c336 100644 --- a/pkgs/applications/science/electronics/pulseview/default.nix +++ b/pkgs/applications/science/electronics/pulseview/default.nix @@ -1,45 +1,33 @@ -{ lib, stdenv, fetchurl, fetchpatch, pkg-config, cmake, glib, boost, libsigrok -, libsigrokdecode, libserialport, libzip, udev, libusb1, libftdi1, glibmm -, pcre, python3, qtsvg, qttools, wrapQtAppsHook, desktopToDarwinBundle +{ lib, stdenv, fetchgit, pkg-config, cmake, glib, boost, libsigrok +, libsigrokdecode, libserialport, libzip, libftdi1, hidapi, glibmm +, pcre, python3, qtsvg, qttools, bluez +, wrapQtAppsHook, desktopToDarwinBundle }: stdenv.mkDerivation rec { pname = "pulseview"; - version = "0.4.2"; + version = "0.4.2-unstable-2024-01-26"; - src = fetchurl { - url = "https://sigrok.org/download/source/pulseview/pulseview-${version}.tar.gz"; - hash = "sha256-8EL3ej4bNb8wZmMw427Dj6uNJIw2k8N7fjXUAcO/q8s="; + src = fetchgit { + url = "git://sigrok.org/pulseview"; + rev = "9b8b7342725491d626609017292fa9259f7d5e0e"; + hash = "sha256-UEJunADzc1WRRfchO/n8qqxnyrSo4id1p7gLkD3CKaM="; }; nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ] ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; buildInputs = [ - glib boost libsigrok libsigrokdecode libserialport libzip libusb1 libftdi1 glibmm + glib boost libsigrok libsigrokdecode libserialport libzip libftdi1 hidapi glibmm pcre python3 qtsvg - ] ++ lib.optional stdenv.isLinux udev; - - patches = [ - # Allow building with glib 2.68 - # PR at https://github.com/sigrokproject/pulseview/pull/39 - (fetchpatch { - url = "https://github.com/sigrokproject/pulseview/commit/fb89dd11f2a4a08b73c498869789e38677181a8d.patch"; - hash = "sha256-0PlE/z4tbN1JFfAUBeZiXc3ENzwuhCaulIBRmXTULh4="; - }) - # Fixes replaced/obsolete Qt methods - (fetchpatch { - url = "https://github.com/sigrokproject/pulseview/commit/ae726b70a7ada9a4be5808e00f0c951318479684.patch"; - hash = "sha256-6bFXFAnTO+MBUmslw55gWWSCCPwnejqKGpHeJOoH0e8="; - }) - ]; + ] ++ lib.optionals stdenv.isLinux [ bluez ]; meta = with lib; { description = "Qt-based LA/scope/MSO GUI for sigrok (a signal analysis software suite)"; homepage = "https://sigrok.org/"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ bjornfor ]; + maintainers = with maintainers; [ bjornfor vifino ]; platforms = platforms.unix; }; } diff --git a/pkgs/applications/science/electronics/simulide/default.nix b/pkgs/applications/science/electronics/simulide/default.nix new file mode 100644 index 000000000000..fbd76a0e0ffc --- /dev/null +++ b/pkgs/applications/science/electronics/simulide/default.nix @@ -0,0 +1,129 @@ +{ lib +, fetchbzr +, mkDerivation +, qmake +, qtserialport +, qtmultimedia +, qttools +, qtscript +}: + +let + generic = + { version + , release + , branch + , rev + , sha256 + , extraPostPatch ? "" + , extraBuildInputs ? [ ] + , iconPath ? "resources/icons/simulide.png" + , installFiles ? '' + cp -r data examples $out/share/simulide + cp simulide $out/bin/simulide + '' + }: + mkDerivation { + pname = "simulide"; + version = "${version}-${release}"; + + src = fetchbzr { + url = "https://code.launchpad.net/~arcachofo/simulide/${branch}"; + inherit rev sha256; + }; + + postPatch = '' + sed -i resources/simulide.desktop \ + -e "s|^Exec=.*$|Exec=simulide|" \ + -e "s|^Icon=.*$|Icon=simulide|" + + # Note: older versions don't have REV_NO + sed -i SimulIDE.pro \ + -e "s|^VERSION = .*$|VERSION = ${version}|" \ + -e "s|^RELEASE = .*$|RELEASE = -${release}|" \ + -e "s|^REV_NO = .*$|REV_NO = ${rev}|" \ + -e "s|^BUILD_DATE = .*$|BUILD_DATE = ??-??-??|" + + ${extraPostPatch} + ''; + + preConfigure = '' + cd build_XX + ''; + + nativeBuildInputs = [ + qmake + ]; + + buildInputs = [ + qtserialport + qtmultimedia + qttools + ] ++ extraBuildInputs; + + installPhase = '' + runHook preInstall + + install -Dm644 ../resources/simulide.desktop $out/share/applications/simulide.desktop + install -Dm644 ../${iconPath} $out/share/icons/hicolor/256x256/apps/simulide.png + + mkdir -p $out/share/simulide $out/bin + pushd executables/SimulIDE_* + ${installFiles} + popd + + runHook postInstall + ''; + + meta = { + description = "A simple real time electronic circuit simulator"; + longDescription = '' + SimulIDE is a simple real time electronic circuit simulator, intended for hobbyist or students + to learn and experiment with analog and digital electronic circuits and microcontrollers. + It supports PIC, AVR, Arduino and other MCUs and MPUs. + ''; + homepage = "https://simulide.com/"; + license = lib.licenses.gpl3Only; + mainProgram = "simulide"; + maintainers = with lib.maintainers; [ carloscraveiro tomasajt ]; + platforms = [ "x86_64-linux" ]; + }; + }; +in +{ + simulide_0_4_15 = generic { + version = "0.4.15"; + release = "SR10"; + branch = "simulide_0.4.14"; # the branch name does not mach the version for some reason + rev = "291"; + sha256 = "sha256-BBoZr/S2pif0Jft5wrem8y00dXl08jq3kFiIUtOr3LM="; + extraPostPatch = '' + # GCC 13 needs the <cstdint> header explicitly included + sed -i src/gpsim/value.h -e '1i #include <cstdint>' + sed -i src/gpsim/modules/watchdog.h -e '1i #include <cstdint>' + ''; + extraBuildInputs = [ qtscript ]; + iconPath = "resources/icons/hicolor/256x256/simulide.png"; # upstream had a messed up icon path in this release + installFiles = '' + cp -r share/simulide/* $out/share/simulide + cp bin/simulide $out/bin/simulide + ''; + }; + + simulide_1_0_0 = generic { + version = "1.0.0"; + release = "SR2"; + branch = "1.0.0"; + rev = "1449"; + sha256 = "sha256-rJWZvnjVzaKXU2ktbde1w8LSNvu0jWkDIk4dq2l7t5g="; + extraBuildInputs = [ qtscript ]; + }; + + simulide_1_1_0 = generic { + version = "1.1.0"; + release = "RC1"; + branch = "1.1.0"; + rev = "1912"; + sha256 = "sha256-bgRAqt7h2LtU2Ze6Jiz8APhyPcV15v4ofxIilIeZV9E="; + }; +} |