kicad: remove the separate i18n stuff

i18n is now in the kicad source in both stable and unstable
  behind the withI18n flag which is disabled by default
main
Evils 2 years ago
parent 818894d6a5
commit b3f0da107e
  1. 9
      pkgs/applications/science/electronics/kicad/base.nix
  2. 35
      pkgs/applications/science/electronics/kicad/default.nix
  3. 18
      pkgs/applications/science/electronics/kicad/i18n.nix
  4. 20
      pkgs/applications/science/electronics/kicad/update.sh
  5. 4
      pkgs/applications/science/electronics/kicad/versions.nix

@ -43,7 +43,6 @@
, baseName
, kicadSrc
, kicadVersion
, i18n
, withOCC
, withNgspice
, withScripting
@ -161,16 +160,10 @@ stdenv.mkDerivation rec {
dontStrip = debug;
postInstall = optionalString (withI18n) ''
mkdir -p $out/share
lndir ${i18n}/share $out/share
'';
meta = {
description = "Just the built source without the libraries";
longDescription = ''
Just the build products, optionally with the i18n linked in
the libraries are passed via an env var in the wrapper, default.nix
Just the build products, the libraries are passed via an env var in the wrapper, default.nix
'';
homepage = "https://www.kicad.org/";
license = lib.licenses.agpl3;

@ -32,23 +32,21 @@
}:
# The `srcs` parameter can be used to override the kicad source code
# and all libraries (including i18n), which are otherwise inaccessible
# and all libraries, which are otherwise inaccessible
# to overlays since most of the kicad build expression has been
# refactored into base.nix, most of the library build expressions have
# been refactored into libraries.nix, and most the i18n build
# expression has been refactored into i18n.nix. Overrides are only
# applied when building `kicad-unstable`. The `srcs` parameter has no
# effect for stable `kicad`. `srcs` takes an attribute set in which
# been refactored into libraries.nix. Overrides are only applied when
# building `kicad-unstable`. The `srcs` parameter has
# no effect for stable `kicad`. `srcs` takes an attribute set in which
# any of the following attributes are meaningful (though none are
# mandatory): "kicad", "kicadVersion", "i18n", "symbols", "templates",
# mandatory): "kicad", "kicadVersion", "symbols", "templates",
# "footprints", "packages3d", and "libVersion". "kicadVersion" and
# "libVersion" should be set to a string with the desired value for
# the version attribute in kicad's `mkDerivation` and the version
# attribute in any of the library's or i18n's `mkDerivation`,
# respectively. "kicad", "i18n", "symbols", "templates", "footprints",
# and "packages3d" should be set to an appropriate fetcher (e.g.,
# `fetchFromGitLab`). So, for example, a possible overlay for kicad
# is:
# attribute in any of the library's `mkDerivation`, respectively.
# "kicad", "symbols", "templates", "footprints", and "packages3d"
# should be set to an appropriate fetcher (e.g. `fetchFromGitLab`).
# So, for example, a possible overlay for kicad is:
#
# final: prev:
@ -88,14 +86,6 @@ let
sha256 = versionsImport.${baseName}.kicadVersion.src.sha256;
};
i18nSrcFetch = fetchFromGitLab {
group = "kicad";
owner = "code";
repo = "kicad-i18n";
rev = versionsImport.${baseName}.libVersion.libSources.i18n.rev;
sha256 = versionsImport.${baseName}.libVersion.libSources.i18n.sha256;
};
libSrcFetch = name: fetchFromGitLab {
group = "kicad";
owner = "libraries";
@ -118,11 +108,6 @@ let
if srcOverridep "kicadVersion" then srcs.kicadVersion
else versionsImport.${baseName}.kicadVersion.version;
i18nSrc = if srcOverridep "i18n" then srcs.i18n else i18nSrcFetch;
i18nVersion =
if srcOverridep "i18nVersion" then srcs.i18nVersion
else versionsImport.${baseName}.libVersion.version;
libSrc = name: if srcOverridep name then srcs.${name} else libSrcFetch name;
# TODO does it make sense to only have one version for all libs?
libVersion =
@ -139,11 +124,9 @@ stdenv.mkDerivation rec {
# Common libraries, referenced during runtime, via the wrapper.
passthru.libraries = callPackages ./libraries.nix { inherit libSrc; };
passthru.i18n = callPackage ./i18n.nix { src = i18nSrc; };
base = callPackage ./base.nix {
inherit stable baseName;
inherit kicadSrc kicadVersion;
inherit (passthru) i18n;
inherit wxGTK python wxPython;
inherit withOCC withNgspice withScripting withI18n withPCM;
inherit debug sanitizeAddress sanitizeThreads;

@ -1,18 +0,0 @@
{ lib, stdenv
, cmake
, gettext
, src
}:
stdenv.mkDerivation {
inherit src;
pname = "kicad-i18n";
version = builtins.substring 0 10 src.rev;
nativeBuildInputs = [ cmake gettext ];
meta = with lib; {
license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3
platforms = platforms.all;
};
}

@ -66,10 +66,6 @@ gitlab="https://gitlab.com/kicad"
# append commit hash or tag
gitlab_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/archive.tar.gz?sha="
# not a lib, but separate and already moved to gitlab
i18n="${gitlab}/code/kicad-i18n.git"
i18n_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad-i18n/repository/archive.tar.gz?sha="
count=0
printf "Latest tag is\t%s\n" "${latest_tag}" >&2
@ -127,20 +123,6 @@ for version in "${all_versions[@]}"; do
printf "%6sversion =\t\t\t\"%s\";\n" "" "${today}"
printf "%6slibSources = {\n" ""
echo "Checking i18n" >&2
i18n_rev="$(${get_rev} "${i18n}" "${version}" | cut -f1)"
has_rev="$(grep -sm 1 "\"${pname}\"" -A 11 "${file}" | grep -sm 1 "${i18n_rev}" || true)"
has_hash="$(grep -sm 1 "\"${pname}\"" -A 12 "${file}" | grep -sm 1 "i18n.sha256" || true)"
if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then
echo "Reusing old kicad-i18n-${today}.src.sha256, already latest .rev" >&2
grep -sm 1 "\"${pname}\"" -A 12 "${file}" | grep -sm 1 "i18n" -A 1
else
printf "%8si18n.rev =\t\t\"%s\";\n" "" "${i18n_rev}"
printf "%8si18n.sha256 =\t\t\"%s\";\n" "" \
"$(${prefetch} "${i18n_pre}${i18n_rev}")"
count=$((count+1))
fi
for lib in "${libs[@]}"; do
echo "Checking ${lib}" >&2
url="${gitlab}/libraries/kicad-${lib}.git"
@ -166,7 +148,7 @@ for version in "${all_versions[@]}"; do
printf "%2s};\n" ""
else
printf "\nReusing old %s\n" "${pname}" >&2
grep -sm 1 "\"${pname}\"" -A 23 "${file}"
grep -sm 1 "\"${pname}\"" -A 21 "${file}"
fi
done
printf "}\n"

@ -12,8 +12,6 @@
libVersion = {
version = "6.0.0";
libSources = {
i18n.rev = "0ad3d7e469e31c8868ad83f90e22a9c18f16aa1f";
i18n.sha256 = "0y51l0r62cnxkvpc21732p3cx7pjvaqjih8193502hlv9kv1j9p6";
symbols.rev = "275f22eb9eecd5b6deabdefd82c9a826254d9f23";
symbols.sha256 = "0wjk464l60xknvgc9d870901lqnx296dw7amlh3wg0wf78izarfr";
templates.rev = "3a422b5b0928f3fd31579769d4dee2b009a85a11";
@ -36,8 +34,6 @@
libVersion = {
version = "2021-12-25";
libSources = {
i18n.rev = "e89d9a89bec59199c1ade56ee2556591412ab7b0";
i18n.sha256 = "04zaqyhj3qr4ymyd3k5vjpcna64j8klpsygcgjcv29s3rdi8glfl";
symbols.rev = "125a2e736504e776e4c6fb7f5131efad75edf245";
symbols.sha256 = "0wjk464l60xknvgc9d870901lqnx296dw7amlh3wg0wf78izarfr";
templates.rev = "8c9ff3dadb9c75cf2932f11c09a46c0c9d84784b";

Loading…
Cancel
Save