Skip to content

kicad-unstable-small: init to build kicad-unstable's base on hydra#82634

Merged
Mic92 merged 4 commits intoNixOS:masterfrom
evils:kicad
May 11, 2020
Merged

kicad-unstable-small: init to build kicad-unstable's base on hydra#82634
Mic92 merged 4 commits intoNixOS:masterfrom
evils:kicad

Conversation

@evils
Copy link
Member

@evils evils commented Mar 15, 2020

Motivation for this change

kicad-unstable does not get built by hydra

Things done
  • add kicad-unstable-small so the components of kicad-unstable that hydra can build, get build
  • make the CLI utilities available by linking to them them in the wrapper
  • move libraries and base out of the let block so they can be addressed directly
  • bump kicad-unstable to latest versions
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 15, 2020
@veprbl
Copy link
Member

veprbl commented Mar 15, 2020

@GrahamcOfBorg build kicad-unstable

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is three different changes. Please split them into separate commits.

@veprbl
Copy link
Member

veprbl commented Mar 15, 2020

mkLib needs to be updated to use recursiveUpdate[1] so that meta.license doesn't get overwritten.

[1]

nixpkgs/lib/attrsets.nix

Lines 405 to 427 in fbafe7c

/* A recursive variant of the update operator ‘//’. The recursion
stops when one of the attribute values is not an attribute set,
in which case the right hand side value takes precedence over the
left hand side value.
Example:
recursiveUpdate {
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/hda";
} {
boot.loader.grub.device = "";
}
returns: {
boot.loader.grub.enable = true;
boot.loader.grub.device = "";
}
*/
recursiveUpdate = lhs: rhs:
recursiveUpdateUntil (path: lhs: rhs:
!(isAttrs lhs && isAttrs rhs)
) lhs rhs;

@evils
Copy link
Member Author

evils commented Mar 15, 2020

@veprbl i've changed it to use recursiveUpdate, it didn't affect the build output, i assume the metadata is stored separately, the libraries aren't directly addressable so i couldn't use nix repl to check if this worked...

@evils evils changed the title kicad: hydraPlatforms -> meta.hydraPlatforms [ZHF] kicad: don't build with 3d on hydra; update unstable Mar 17, 2020
@ofborg ofborg bot added 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 17, 2020
@evils evils changed the title [ZHF] kicad: don't build with 3d on hydra; update unstable kicad-unstable: bump to latest sources; fix update.sh Mar 17, 2020
@evils evils changed the title kicad-unstable: bump to latest sources; fix update.sh kicad-unstable: 2020-02-10 -> 2020-03-16; fix update.sh Mar 17, 2020
@evils evils changed the title kicad-unstable: 2020-02-10 -> 2020-03-16; fix update.sh kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh Mar 17, 2020
@evils evils changed the title kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh [WIP] kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh Mar 18, 2020
@evils evils changed the title [WIP] kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh Mar 19, 2020
@evils evils changed the title kicad-unstable: 2020-02-10 -> 2020-03-17; fix update.sh kicad-unstable: 2020-02-10 -> 2020-03-19; fix update.sh Mar 19, 2020
@evils evils changed the title kicad-unstable: 2020-02-10 -> 2020-03-19; fix update.sh [WIP] kicad-unstable: build base on hydra; fix update.sh Mar 27, 2020
@evils evils changed the title kicad-unstable: build base on hydra; fix update.sh [WIP] kicad-unstable: build base on hydra; fix update.sh Apr 2, 2020
@evils evils changed the title [WIP] kicad-unstable: build base on hydra; fix update.sh kicad-unstable: build base on hydra; fix update.sh Apr 3, 2020
@evils evils changed the title kicad-unstable: build base on hydra; fix update.sh [WIP] kicad-unstable: build base on hydra; fix update.sh Apr 6, 2020
@evils evils changed the title [WIP] kicad-unstable: build base on hydra; fix update.sh kicad-unstable: build base on hydra; fix update.sh Apr 6, 2020
@evils evils force-pushed the kicad branch 2 times, most recently from dffdab6 to 32e3bd1 Compare April 7, 2020 19:37
@evils evils force-pushed the kicad branch 2 times, most recently from 9840c4b to 189f66f Compare April 20, 2020 13:14
@evils evils force-pushed the kicad branch 2 times, most recently from 6189d40 to 6bd32c2 Compare April 25, 2020 21:14
veprbl pushed a commit that referenced this pull request Apr 26, 2020
and some more suggestions from veprbl

warn if an empty item gets through anyway

and use UTC time

cc #82634
veprbl pushed a commit that referenced this pull request Apr 26, 2020
evils added 4 commits May 7, 2020 01:54
the -small packages depend on all hydra buildable dependencies
the non-small ones depend on packages3d which exceeds hydra's limit

set platforms to all (kicad is cross-platform)
clarify package differences in the description

set maintainers on just the top level derivation

switch -unstable to not save debug symbols

indicate patch in version string

note broken dependencies
@evils evils changed the title kicad-unstable: build base on hydra; fix update.sh kicad-unstable-small: init to build kicad-unstable's base on hydra May 9, 2020
@Mic92
Copy link
Member

Mic92 commented May 11, 2020

Result of nixpkgs-review pr 82634 1

2 packages built:
- kicad-small
- kicad-unstable-small

@Mic92 Mic92 merged commit 3a9543b into NixOS:master May 11, 2020
substituteInPlace CMakeModules/KiCadVersion.cmake \
--replace "unknown" ${builtins.substring 0 10 src.rev}
--replace "unknown" "${builtins.substring 0 10 src.rev}-1" \
--replace "${version}" "${version}-1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use patchlevels in nixpkgs because the build process of a package can be amended in many different ways, and all those changes can be tracked by looking at the store paths hashes and inside drv files. Patchlevels can't keep up with they, they will quickly become outdated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my goal with this was to make it clear in a kicad bug report (which contains that string) which commit the package was based on, while still making it clear a patch was added

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/kicad-suddenly-getting-rebuilt-from-source/16315/8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants