summary refs log tree commit diff
path: root/pkgs/build-support
Commit message (Collapse)AuthorAge
* Revert "virtualization/qemu-vm: fix and improve virtio/scsi switching"Sarah Brofeldt2018-09-25
| | | | | | | This reverts commit f777d2b719be0db4cb7819d5b6dbdd121db29a37. cc #34409 This breaks evaluation of the tested job: attribute 'diskInterface' missing, at /nix/store/5k9kk52bv6zsvsyyvpxhm8xmwyn2yjvx-source/pkgs/build-support/vm/default.nix:316:24
* Merge autoPatchelfHook improvements (#47222)aszlig2018-09-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the initialy commit was done by @Mic92 plus a few fixes from my side. So essentially this avoids patching statically linked executables and also speeds up searching for ELF files altogether. I've tested this by comparing the outputs of all the derivations which make use of this hook using the following Nix expression: let getPackagesForRev = rev: with import (builtins.fetchGit { url = ./.; inherit rev; }) { config.allowUnfree = true; }; [ cups-kyodialog3 elasticsearch franz gurobi javacard-devkit masterpdfeditor maxx oracle-instantclient powershell reaper teamviewer unixODBCDrivers.msodbcsql17 virtlyst wavebox zoom-us ]; pkgs = import <nixpkgs> {}; baseRev = "ef764eb0d8314b81a012dae04642b4766199956d"; in pkgs.runCommand "diff-contents" { chset = pkgs.lib.zipListsWith (old: new: pkgs.runCommand "diff" { inherit old new; nativeBuildInputs = [ pkgs.nukeReferences ]; } '' mkdir -p "''${NIX_STORE#/}" cp --no-preserve=all -r "$old" "''${NIX_STORE#/}" cp --no-preserve=all -r "$new" "''${NIX_STORE#/}" find "''${old#/}" "''${new#/}" \ \( -type f -exec nuke-refs {} + \) -o \( -type l -delete \) mkdir "$out" echo "$old" > "$out/old-path" echo "$new" > "$out/new-path" diff -Nur "''${old#/}" "''${new#/}" > "$out/diff" || : '') (getPackagesForRev baseRev) (getPackagesForRev ""); } '' err=0 for c in $chset; do if [ -s "$c/diff" ]; then echo "$(< "$c/old-path") -> $(< "$c/new-path")" \ "differs, report: $c/diff" >&2 err=1 fi done [ $err -eq 0 ] && touch "$out" '' With these changes there is only one derivation which has altered contents, which is "franz". However the reason why it has differing contents is not directly because of the autoPatchelfHook changes, but because the "env-vars" file from the builder is in "$out/opt/franz/env-vars" (Cc: @gnidorah) and we now have different contents for NIX_CFLAGS_COMPILE and other environment variables. I also tested this against a random static binary and the hook no longer tries to patch it. Merges: #47222
| * autoPatchelfHook: Silence errors in isExecutableaszlig2018-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "maxx" package recursively runs isExecutable on a bunch of files and since the change to use "readelf" instead of "file" a lot of errors like this one are printed during build: readelf: Error: Not an ELF file - it has the wrong magic bytes at the start While the isExecutable was never meant to be used outside of the autoPatchelfHook, it's still a good idea to silence the errors because whenever readelf fails, it clearly indicates that the file in question is not a valid ELF file. Signed-off-by: aszlig <aszlig@nix.build>
| * autoPatchelfHook: Only check PT_INTERP on execsaszlig2018-09-25
| | | | | | | | | | | | | | | | | | | | | | If the ELF file is not an executable, we do not get a PT_INTERP section, because after all, it's a *shared* library. So instead of checking for PT_INTERP (to avoid statically linked executables) for all ELF files, we add another check to see if it's an executable and *only* skip it when it is and there's no PT_INTERP. Signed-off-by: aszlig <aszlig@nix.build>
| * autoPatchelfHook: do not patch statically linked filesJörg Thalheim2018-09-23
| | | | | | | | Also speed up quite significantly due less forking.
* | Merge pull request #47238 from obsidiansystems/overrideScope-orderJohn Ericson2018-09-24
|\ \ | | | | | | lib: Deprecate `overrideScope` in lieu of `overrideScope'` taking arguments in the conventional order
| * | lib: Make `overrideScope'` which takes arguments in the conventional orderJohn Ericson2018-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `overrideScope` bound by `makeScope` (via special `callPackage`) took an override in the form `super: self { … }`. But this is dangerously close to the `self: super { … }` form used by *everything* else, even other definitions of `overrideScope`! Since that implementation did not even share any code either until I changed it recently in 3cf43547f4be03d1d6eb0bbfc557e2dbc13b4095, this inconsistency is almost certainly an oversight and not intentional. Unfortunately, just as the inconstency is hard to debug if one just assumes the conventional order, any sudden fix would break existing overrides in the same hard-to-debug way. So instead of changing the definition a new `overrideScope'` with the conventional order is added, and old `overrideScope` deprecated with a warning saying to use `overrideScope'` instead. That will hopefully get people to stop using `overrideScope`, freeing our hand to change or remove it in the future.
* | | virtualization/qemu-vm: fix and improve virtio/scsi switchingStefan Junker2018-09-22
| |/ |/|
* | Merge pull request #47145 from obsidiansystems/fetchzip-crossJohn Ericson2018-09-21
|\| | | | | fetchzip: Use unzip from buildPackages
| * fetchzip: Use unzip from buildPackagesJohn Ericson2018-09-21
| | | | | | | | Additionally, the manual path manipulation becomes no longer needed.
* | dockerTools.buildImage: test that created=now makes an unstable dateGraham Christensen2018-09-20
| |
* | dockerTools.buildImage: support impure datesGraham Christensen2018-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because dates are an impurity, by default buildImage will use a static date of one second past the UNIX Epoch. This can be a bit frustrating when listing docker images in the CLI: $ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE hello latest 08c791c7846e 48 years ago 25.2MB If you want to trade the purity for a better user experience, you can set created to now. pkgs.dockerTools.buildImage { name = "hello"; tag = "latest"; created = "now"; contents = pkgs.hello; config.Cmd = [ "/bin/hello" ]; } and now the Docker CLI will display a reasonable date and sort the images as expected: $ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE hello latest de2bf4786de6 About a minute ago 25.2MB
* | dockerTools.pullImage: correct default archJack Kelly2018-09-19
| |
* | buildRustCrate: added some edge cases with binariesAndreas Rammhold2018-09-13
| | | | | | | | | | | | | | This commit adds test based on real-world crates (brotli). There were a few more edge cases that were missing beforehand. Also it turned out that we can get rid of the `finalBins` list since that will now be handled during runtime.
* | buildRustCrate: add test casesAndreas Rammhold2018-09-13
| |
* | buildRustCrate: binary heuristic should be able to treat spacesAndreas Rammhold2018-09-13
| |
* | buildRustCrate: extracted builder scripts into dedicated filesAndreas Rammhold2018-09-13
| | | | | | | | | | | | The build expression got quiet large over time and to make it a bit easier to grasp the different scripts involved in the build are now separated from the nix file.
* | buildRustCrate: add heuristic to picking the right source filesAndreas Rammhold2018-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cargo has a few odd (old) ways of picking source files if the `bin.path` attribute isn't given in the Cargo.toml. This commit adds support for some of those. The previous behaviour always defaulted to `src/main.rs` which was not always the right choice. Since there is look-ahead into the unpacked sources before running the actual builder the path selection logic has to be embedded within the build script. `buildRustCrate` currently supports two ways of running building binaries when processing a crate: - Explicit definition of all the binaries (& optionally the paths to their respective `main.rs`) and, - if not binary was explictly configured all files matching the patterns `src/main.rs`, `src/bin/*.rs`. When the explicit list is given without path information paths are now being picked from a list of candidates. The first match wins. The order is the same as within the cargo compatibility code. If the crate does not provide any libraries the path `src/{bin_name}.rs` is also considered. All underscores within the binary names are translated into dashes (`-`) before the lookups are made. This seems to be a common convention.
* | vmTools: update debian repositories to stable Release.xz urlsAndreas Rammhold2018-09-13
| | | | | | | | | | | | | | Previously the Release.xz URL would show up with a new hash whenever debian releases an update. By using archive.org we should have a stable source for those. I wasn't able to find the equivalent in the debian world. Maybe they don't keep all the different Release files around..
* | Merge branch 'no-toPath'Shea Levy2018-09-06
|\ \
| * | treewide: Remove uses of builtins.toPath.Shea Levy2018-05-22
| | | | | | | | | | | | | | | | | | | | | | | | toPath has confusing semantics and is never necessary; it can always either just be omitted or replaced by pre-concatenating `/.`. It has been marked as "!!! obsolete?" for more than 10 years in a C++ comment, hopefully removing it will let us properly deprecate and, eventually, remove it.
* | | skaware: switch from git repos to tarballsProfpatsch2018-09-06
| | | | | | | | | | | | It should be more performant this way.
* | | skawarePackages: factor out the common partsProfpatsch2018-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a `skawarePackages.buildPackage` function that contains the common setup, removing a lot of duplication. In particular, we require that the build directory has to be empty after the `fixupPhase`, to make sure every relevant file is moved to the outputs. A next step would be to deduplicate the `configureFlags` attributes and only require a `skawareInputs` field.
* | | treewide: cleanup some references to bashJan Malakhovski2018-09-04
| |/ |/|
* | lib: ensure directories of linkFarm links exist (#45628)Alyssa Ross2018-09-01
| | | | | | | | | | | | There's no reason `linkFarm` can't be used for symlinks in subdirectories, except that currently it doesn't ensure the directory of the link exists. This backwards-compatible change expands the utility of the function.
* | treewide: Remove usage of remaining redundant platform compatability stuffJohn Ericson2018-08-30
| | | | | | | | | | Want to get this out of here for 18.09, so it can be deprecated thereafter.
* | reewide: Purge all uses `stdenv.system` and top-level `system`John Ericson2018-08-30
| | | | | | | | It is deprecated and will be removed after 18.09.
* | Merge pull request #26416 from lverns/make-genericName-optionalSamuel Dionne-Riel2018-08-27
|\ \ | | | | | | make-desktopitem: make genericName optional
| * | make-desktopitem: make genericName optionalLaverne Schrock2017-06-05
| | |
* | | makeWrapper: document --set-defaultAlyssa Ross2018-08-24
| | |
* | | Merge branch 'master' into stagingVladimír Čunát2018-08-22
|\ \ \ | | | | | | | | | | | | Hydra: ?compare=1474932
| * | | fetchpatch: patchutils -> buildPackages.patchutilsvolth2018-08-21
| | | |
* | | | Revert "Merge pull request #44767 from obsidiansystems/wrapper-env-var-path"Matthew Bauer2018-08-22
| | | | | | | | | | | | | | | | | | | | This reverts commit 89efc27f571368b475ce87e71445be10a9d1121a, reversing changes made to d0f11020ca55dfe20ecad05005343e3a3e3cbd90.
* | | | Merge remote-tracking branch 'origin/master' into stagingMatthew Bauer2018-08-21
|\| | |
| * | | Merge branch 'staging-next'Vladimír Čunát2018-08-21
| |\ \ \ | | | | | | | | | | | | | | | Security fixes for a few packages are included.
| * | | | treewide: Purge `stdenv.platform` and top-level `platform`John Ericson2018-08-20
| | | | | | | | | | | | | | | | | | | | Progress towards #27069
* | | | | Merge pull request #45396 from dtzWill/fix/audit-tmpdir-quoteWill Dietz2018-08-21
|\ \ \ \ \ | | | | | | | | | | | | audit-tmpdir: fix processing of files with spaces, quote variables
| * | | | | audit-tmpdir: fix processing of files with spaces, quote variablesWill Dietz2018-08-20
| | |/ / / | |/| | |
* / | | | [RFC] ppc64le enablement (#45340)CrystalGamma2018-08-21
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ppc64le enablement * gcc, glibc: properly handle __float128 * lib/systems, stdenv: syntax cleanup * gcc7: remove ugly hack * gcc: add/update __float128 flags * stdenv: add another pair of quotes for consistency * gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
* | | | Merge pull request #44767 from obsidiansystems/wrapper-env-var-pathJohn Ericson2018-08-17
|\ \ \ \ | | | | | | | | | | {cc,bintools}-wrapper, ghc, libgcc: Define wrapper env vars as full paths
| * | | | bintools-wrapper: Define env vars with full pathJohn Ericson2018-08-08
| | | | |
| * | | | cc-wrapper: Define env vars with full pathJohn Ericson2018-08-06
| | | | |
* | | | | Merge branch 'staging-next' into stagingVladimír Čunát2018-08-17
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Merge branch 'master' into staging-nextVladimír Čunát2018-08-17
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Hydra: ?compare=1473892
| | * | | | carnix overrides: add gmp to rink-rs buildInputs & correct crateBinStewart Mackenzie2018-08-15
| | | | | |
| | * | | | Merge pull request #44981 from Ekleog/rust-patch-bisJörg Thalheim2018-08-14
| | |\ \ \ \ | | | | | | | | | | | | | | buildRustPackage: allow patches to fix Cargo.lock
| | | * | | | buildRustPackage: allow patches to fix Cargo.lockLéo Gaspard2018-08-13
| | | | | | |
| | * | | | | Revert "buildRustPackage: allow patches to fix Cargo.lock"Jörg Thalheim2018-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b6e881ab72fbd0bb50b58668b457f7a79ceb8993. We need to fix checksums for this pull request first. Also see https://github.com/NixOS/nixpkgs/pull/44967
| | * | | | | Merge pull request #44967 from Ekleog/rust-patchJörg Thalheim2018-08-13
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | buildRustPackage: allow patches to fix Cargo.lock
| | | * | | | | buildRustPackage: allow patches to fix Cargo.lockLéo Gaspard2018-08-13
| | | |/ / / /