Commit Graph

18 Commits

Author SHA1 Message Date
Gavin John
cbabc6874d
srcOnly: Fix bug introduced by rewrite 2024-10-08 10:15:42 -07:00
Gavin John
28ee6e7979
(WIP) srcOnly: Add noogle-compatible documentation 2024-09-29 12:51:40 -07:00
Gavin John
1463fe69c6
srcOnly: use derivation's stdenv and default to stdenvNoCC 2024-09-29 12:51:39 -07:00
Gavin John
13f0f6e596
srcOnly: Add warning if dontUnpack is set 2024-09-29 12:51:38 -07:00
Gavin John
0b77f4ad4f
srcOnly: some readability improvements 2024-09-29 12:51:36 -07:00
sternenseemann
affa8f75ec Reapply "srcOnly: reflink if possible and preserve attributes"
This reverts commit 610ee378fc.

Reason for reapply: The change was alright, just went to the wrong
branch.
2024-05-27 13:41:36 +02:00
sternenseemann
610ee378fc Revert "srcOnly: reflink if possible and preserve attributes"
This reverts commit 7173eb87b8.

Reason for revert: This causes too big a rebuild for master (since GHC
uses srcOnly). This went unnoticed due to a stale ofborg rebuild count.
2024-05-27 02:11:54 +02:00
sternenseemann
7173eb87b8 srcOnly: reflink if possible and preserve attributes
This matches how the default unpackPhase would copy from a store path
into the build directory, so it seems wise to match this here. On file
systems that support reflinks, this should improve performance as well.
2024-05-26 22:06:10 +02:00
Michael Hoang
b2ff7ceff2 nixos/tests: Test that Remote SSH can patch Node 2023-06-09 18:21:41 +10:00
sternenseemann
c98cda29f7 srcOnly: prevent phases being skipped
Previously srcOnly would not work for e.g.
`srcOnly haskell.compiler.ghcjs`, as the custom `installPhase` would be
skipped if `dontInstall` is set. Consequently, we need to ensure that
the two skippable phases we need will always be executed.
2023-01-06 19:02:50 +01:00
figsoda
dd73077dc3 srcOnly: remove unused binding 2022-09-26 22:18:55 -04:00
sternenseemann
f76ac449d1 srcOnly: fix with separateDebugInfo and/or multiple outputs
Before this change `srcOnly git` gives:

    duplicate derivation output 'debug', at pkgs/stdenv/generic/make-derivation.nix:270:7

This was because separateDebugInfo = true was passed on to the srcOnly
mkDerivation as well as the outputs list _including_ the debug output.
Luckily we don't need to untangle this mess since srcOnly is only
supposed to have a single output anyways.
2022-07-02 19:32:24 +02:00
mdarocha
fb94bb0b20 src-only: pass all arguments
This allows executing postPatch and other hooks correctly
2022-06-21 12:13:38 +02:00
zimbatm
31ead7d030
srcOnly: rename buildInputs to nativeBuildInputs
The only reason to pass build inputs is to extend the unpackPhase with
custom unpack commands. Eg: add "unrar" to unpack rar sources. And those
should really be passed as native build inputs. Why? Because
nativeBuildInputs is for dependencies that are used at build time but
will not propagate as runtime dependencies. And also, cross-compilation.
2020-04-27 14:31:40 +02:00
zimbatm
bbbc419186
srcOnly: fix invocation and document
Previously, callPackage would try and fill the arguments such as `name`
and `src` which would cause problems if those existed as top-level
attributes. This also makes it clearer what part is the function
signature.

Then document the derivation inline in the code to explain the ellipsis
and various use-cases.
2020-04-22 14:06:28 +02:00
edef
11e13acc46 srcOnly: ignore additional arguments
This reverts commit b32a057425,
which breaks even the most straightforward uses of srcOnly:

    nix-repl> srcOnly guile
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

    nix-repl> srcOnly hello
    error: anonymous function at /home/src/nixpkgs/pkgs/build-support/src-only/default.nix:1:1 called with unexpected argument 'drvPath', at /home/src/nixpkgs/lib/customisation.nix:69:16

Link: https://github.com/NixOS/nixpkgs/pull/80903#issuecomment-617172927
2020-04-21 13:20:17 +00:00
zimbatm
b32a057425
srcOnly: remove the ellipsis (#80903)
The function doesn't make use of the extra arguments.
2020-02-24 23:12:37 +00:00
Michael Raskin
ccf99b2ddf A helper to get the source some package is built from.
svn path=/nixpkgs/trunk/; revision=12933
2008-10-01 15:57:22 +00:00