Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d7bc97c45c11
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 357e095a7be7
Choose a head ref

Commits on Jan 21, 2021

  1. narinfo: Change NAR URLs to be addressed on the NAR hash instead of t…

    …he compressed hash
    
    This change is to simplify [Trustix](https://github.com/tweag/trustix) indexing and makes it possible to reconstruct this URL regardless of the compression used.
    
    In particular this means that https://github.com/tweag/trustix/blob/7c2e9ca597de233846e0b265fb081626ca6c59d8/contrib/nix/nar/nar.go#L61-L71 can be removed and only the bits that are required to establish trust needs to be published in the Trustix build logs.
    adisbladis committed Jan 21, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    144cad9 View commit details

Commits on Jan 28, 2021

  1. Add a new Cmd type working on RealisedPaths

    Where a `RealisedPath` is a store path with its history, meaning either
    an opaque path for stuff that has been directly added to the store, or a
    `Realisation` for stuff that has been built by a derivation
    
    This is a low-level refactoring that doesn't bring anything by itself
    (except a few dozen extra lines of code :/ ), but raising the
    abstraction level a bit is important on a number of levels:
    
    - Commands like `nix build` have to query for the realisations after the
      build is finished which is fragile (see
      27905f1 for example). Having them
      oprate directly at the realisation level would avoid that
    - Others like `nix copy` currently operate directly on (built) store
      paths, but need a bit more information as they will need to register
      the realisations on the remote side
    thufschmitt committed Jan 28, 2021
    Copy the full SHA
    9355ecd View commit details

Commits on Jan 29, 2021

  1. Use passthru for perl-bindings, allows Nix patching for Hydra

    This allows patching Nix for Hydra with additional overlays, because
    `.overrideAttrs` and co. will persist the passthru's
    infinisil committed Jan 29, 2021

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    infinisil Silvan Mosberger
    Copy the full SHA
    d5acc48 View commit details

Commits on Feb 3, 2021

  1. Use derivation output name from toDerivation

    This fixes an issue where derivations with a primary output that is
    not "out" would fail with:
    
    $ nix profile install nixpkgs#sqlite
    error: opening directory '/nix/store/2a2ydlgyydly5czcc8lg12n6qqkfz863-sqlite-3.34.1-bin': No such file or directory
    
    This happens because while derivations produce every output when
    built, you might not have them if you didn't build the derivation
    yourself (for instance, the store path was fetch from a binary cache).
    This uses outputName provided from DerivationInfo which appears to
    match the first output of the derivation.
    matthewbauer committed Feb 3, 2021
    Copy the full SHA
    3d1bbab View commit details

Commits on Feb 4, 2021

  1. Always enter first level of attrset in nix search

    This makes nix search always go through the first level of an
    attribute set, even if it's not a top level attribute. For instance,
    you can now list all GHC compilers with:
    
    $ nix search nixpkgs#haskell.compiler
    ...
    
    This is similar to how nix-env works when you pass in -A.
    matthewbauer committed Feb 4, 2021
    Copy the full SHA
    e38cd5b View commit details
  2. Normalize some error messages

    Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
    Théophane Hufschmitt and edolstra authored Feb 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ca8face View commit details
  3. Fix a whitespace issue

    Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
    Théophane Hufschmitt and edolstra authored Feb 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    43d409f View commit details

Commits on Feb 5, 2021

  1. Merge pull request #4517 from matthewbauer/recurse-first-level-nix-se…

    …arch
    
    Always enter first level of attrset in nix search
    edolstra authored Feb 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a487d42 View commit details
  2. Move the GENERATE_CMP macro to its own file

    Despite being an ugly hack, it can probably be useful in a couple extra
    places
    thufschmitt committed Feb 5, 2021
    Copy the full SHA
    d2091af View commit details
  3. Remove the visit machinery in RealisedPath

    In addition to being some ugly template trickery, it was also totally
    useless as it was used in only one place where I could replace it by
    just a few extra characters
    thufschmitt committed Feb 5, 2021
    Copy the full SHA
    e69cfde View commit details
  4. Add a trace to readLine() failures

    Hopefully this helps to diagnose 'error: unexpected EOF reading a
    line' on macOS.
    edolstra committed Feb 5, 2021
    1
    Copy the full SHA
    0187838 View commit details
  5. Merge pull request #4515 from matthewbauer/fix-nix-profile-install-fi…

    …rst-output
    
    Use derivation output name from toDerivation
    edolstra authored Feb 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c77f4a9 View commit details
  6. Merge pull request #4495 from Infinisil/perl-bindings-passthru

    Use passthru for perl-bindings, allows Nix patching for Hydra
    edolstra authored Feb 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    271eedb View commit details
  7. Merge pull request #4372 from tweag/ca/drvoutputs-commands

    Add a new Cmd type working on RealisedPaths
    edolstra authored Feb 5, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d7c27f2 View commit details
  8. Copy the full SHA
    480426a View commit details

Commits on Feb 6, 2021

  1. libcmd/markdown: handle allocation errors in lowdown_term_rndr

    We upgrade to lowdown 0.8.0 [1] which contains a fix/improvement to a
    behavior mentioned in this issue thread [2] where a big part of
    lowdown's API would just call exit(1) on allocation errors since that
    is a satisfying behavior for the lowdown binary.
    
    Now lowdown_term_rndr returns 0 if an allocation error occurred which we
    check for in libcmd/markdown.cc.
    
    Also the extern "C" { } wrapper around lowdown.h has been removed as it
    is not necessary.
    
    [1]: https://github.com/kristapsdz/lowdown/blob/6ca7c855a063d1c77ae0b89405047cc3913a74d8/versions.xml#L987-L1006
    [2]: kristapsdz/lowdown#45 (comment)
    sternenseemann committed Feb 6, 2021
    Copy the full SHA
    d0e34c8 View commit details
  2. Add Stale bot

    The configuration was taken from nixpkgs repository and adjusted to
    `NixOS/nix`.
    
    A `stale` label was added to the labels (with gray color).
    
    Issues and PRs with `critical` label are excluded from interacting with the
    stale bot.
    garbas committed Feb 6, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    6af26b7 View commit details
  3. typo

    garbas committed Feb 6, 2021

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    91d8342 View commit details

Commits on Feb 7, 2021

  1. Copy the full SHA
    37352aa View commit details
  2. Merge pull request #4525 from sternenseemann/lowdown-0.8.0

    libcmd/markdown: handle allocation errors in lowdown_term_rndr
    edolstra authored Feb 7, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd6eaa1 View commit details

Commits on Feb 8, 2021

  1. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    bab3f30 View commit details

Commits on Feb 9, 2021

  1. Merge pull request #4464 from tweag/nar-narhash-addressed

    narinfo: Change NAR URLs to be addressed on the NAR hash instead of the compressed hash
    edolstra authored Feb 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ee3846b View commit details
  2. Revert "narinfo: Change NAR URLs to be addressed on the NAR hash inst…

    …ead of the compressed hash"
    grahamc authored Feb 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f224509 View commit details

Commits on Feb 10, 2021

  1. Merge pull request #4526 from NixOS/add-stale-bot

    Add Stale bot
    edolstra authored Feb 10, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2d4e102 View commit details
  2. Merge pull request #4535 from NixOS/revert-4464-nar-narhash-addressed

    Revert "narinfo: Change NAR URLs to be addressed on the NAR hash instead of the compressed hash"
    edolstra authored Feb 10, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e98f03 View commit details

Commits on Feb 15, 2021

  1. Cache the Nix evaluation when possible

    Hook into the evaluation to cache to cache the evaluation of flake
    members (stuff like `(builtins.getCache foo).bar.baz`).
    Also replaces the old eval cache that was used at the cli level.
    thufschmitt committed Feb 15, 2021
    Copy the full SHA
    188ed75 View commit details
  2. Copy the full SHA
    007c4a7 View commit details
  3. Copy the full SHA
    357e095 View commit details
35 changes: 35 additions & 0 deletions .github/STALE-BOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Stale bot information

- Thanks for your contribution!
- To remove the stale label, just leave a new comment.
- _How to find the right people to ping?_ &rarr; [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.)
- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/) or on the [#nixos IRC channel](https://webchat.freenode.net/#nixos).

## Suggestions for PRs

1. GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. If you have addressed the reviews you can [officially ask for a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
2. If it is unfinished but you plan to finish it, please mark it as a draft.
3. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
4. To get things rolling again, rebase the PR against the target branch and address valid comments.
5. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604).
6. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions.

## Suggestions for issues

1. If it is resolved (either for you personally, or in general), please consider closing it.
2. If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [our Discourse Forum](https://discourse.nixos.org/).
4. As with all open source projects, your best option is to submit a Pull Request that addresses this issue. We :heart: this attitude!

**Memorandum on closing issues**

Don't be afraid to close an issue that holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

## Useful GitHub search queries

- [Open PRs with any stale-bot interaction](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+)
- [Open PRs with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22)
- [Open PRs with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+)
- [Open Issues with any stale-bot interaction](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+)
- [Open Issues with any stale-bot interaction and `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%22stale%22+)
- [Open Issues with any stale-bot interaction and NOT `stale`](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%22stale%22+)
10 changes: 10 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Configuration for probot-stale - https://github.com/probot/stale
daysUntilStale: 180
daysUntilClose: 365
exemptLabels:
- "critical"
staleLabel: "stale"
markComment: |
I marked this as stale due to inactivity. &rarr; [More info](https://github.com/NixOS/nix/blob/master/.github/STALE-BOT.md)
closeComment: |
I closed this issue due to inactivity. &rarr; [More info](https://github.com/NixOS/nix/blob/master/.github/STALE-BOT.md)
13 changes: 6 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@
# 'nix.perl-bindings' packages.
overlay = final: prev: {

nix = with final; with commonDeps pkgs; (stdenv.mkDerivation {
nix = with final; with commonDeps pkgs; stdenv.mkDerivation {
name = "nix-${version}";
inherit version;

@@ -163,9 +163,8 @@
installCheckFlags = "sysconfdir=$(out)/etc";

separateDebugInfo = true;
}) // {

perl-bindings = with final; stdenv.mkDerivation {
passthru.perl-bindings = with final; stdenv.mkDerivation {
name = "nix-perl-${version}";

src = self;
@@ -199,12 +198,12 @@

};

lowdown = with final; stdenv.mkDerivation {
name = "lowdown-0.7.9";
lowdown = with final; stdenv.mkDerivation rec {
name = "lowdown-0.8.0";

src = fetchurl {
url = https://kristaps.bsd.lv/lowdown/snapshots/lowdown-0.7.9.tar.gz;
hash = "sha512-7GQrKFICyTI5T4SinATfohiCq9TC0OgN8NmVfG3B3BZJM9J00DT8llAco8kNykLIKtl/AXuS4X8fETiCFEWEUQ==";
url = "https://kristaps.bsd.lv/lowdown/snapshots/${name}.tar.gz";
hash = "sha512-U9WeGoInT9vrawwa57t6u9dEdRge4/P+0wLxmQyOL9nhzOEUU2FRz2Be9H0dCjYE7p2v3vCXIYk40M+jjULATw==";
};

#src = lowdown-src;
42 changes: 26 additions & 16 deletions src/libcmd/command.cc
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ void StoreCommand::run()
run(getStore());
}

StorePathsCommand::StorePathsCommand(bool recursive)
RealisedPathsCommand::RealisedPathsCommand(bool recursive)
: recursive(recursive)
{
if (recursive)
@@ -81,30 +81,40 @@ StorePathsCommand::StorePathsCommand(bool recursive)
});
}

void StorePathsCommand::run(ref<Store> store)
void RealisedPathsCommand::run(ref<Store> store)
{
StorePaths storePaths;

std::vector<RealisedPath> paths;
if (all) {
if (installables.size())
throw UsageError("'--all' does not expect arguments");
// XXX: Only uses opaque paths, ignores all the realisations
for (auto & p : store->queryAllValidPaths())
storePaths.push_back(p);
}

else {
for (auto & p : toStorePaths(store, realiseMode, operateOn, installables))
storePaths.push_back(p);

paths.push_back(p);
} else {
auto pathSet = toRealisedPaths(store, realiseMode, operateOn, installables);
if (recursive) {
StorePathSet closure;
store->computeFSClosure(StorePathSet(storePaths.begin(), storePaths.end()), closure, false, false);
storePaths.clear();
for (auto & p : closure)
storePaths.push_back(p);
auto roots = std::move(pathSet);
pathSet = {};
RealisedPath::closure(*store, roots, pathSet);
}
for (auto & path : pathSet)
paths.push_back(path);
}

run(store, std::move(paths));
}

StorePathsCommand::StorePathsCommand(bool recursive)
: RealisedPathsCommand(recursive)
{
}

void StorePathsCommand::run(ref<Store> store, std::vector<RealisedPath> paths)
{
StorePaths storePaths;
for (auto & p : paths)
storePaths.push_back(p.path());

run(store, std::move(storePaths));
}

25 changes: 22 additions & 3 deletions src/libcmd/command.hh
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ struct EvalCommand : virtual StoreCommand, MixEvalArgs
ref<EvalState> getEvalState();

std::shared_ptr<EvalState> evalState;

~EvalCommand();
};

struct MixFlakeOptions : virtual Args, EvalCommand
@@ -141,7 +143,7 @@ private:
};

/* A command that operates on zero or more store paths. */
struct StorePathsCommand : public InstallablesCommand
struct RealisedPathsCommand : public InstallablesCommand
{
private:

@@ -154,17 +156,28 @@ protected:

public:

StorePathsCommand(bool recursive = false);
RealisedPathsCommand(bool recursive = false);

using StoreCommand::run;

virtual void run(ref<Store> store, std::vector<StorePath> storePaths) = 0;
virtual void run(ref<Store> store, std::vector<RealisedPath> paths) = 0;

void run(ref<Store> store) override;

bool useDefaultInstallables() override { return !all; }
};

struct StorePathsCommand : public RealisedPathsCommand
{
StorePathsCommand(bool recursive = false);

using RealisedPathsCommand::run;

virtual void run(ref<Store> store, std::vector<StorePath> storePaths) = 0;

void run(ref<Store> store, std::vector<RealisedPath> paths) override;
};

/* A command that operates on exactly one store path. */
struct StorePathCommand : public InstallablesCommand
{
@@ -218,6 +231,12 @@ std::set<StorePath> toDerivations(ref<Store> store,
std::vector<std::shared_ptr<Installable>> installables,
bool useDeriver = false);

std::set<RealisedPath> toRealisedPaths(
ref<Store> store,
Realise mode,
OperateOn operateOn,
std::vector<std::shared_ptr<Installable>> installables);

/* Helper function to generate args that invoke $EDITOR on
filename:lineno. */
Strings editorFor(const Pos & pos);
Loading