aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-07-17nix edit: call restoreSignals() before `execvp`-ing the $EDITORLars Mühmel
Currently resizing of the terminal doesn't play nicely with nix edit when using kakoune as the editor, as it relies on the SIGWINCH signal which is trapped by nix. How this is not a problem with e.g. vim is beyond me. Virtually all other exec* calls are following a call to restoreSignals(). This commit adds this behavior to nix edit as well.
2020-07-17parseFlakeRef(): Only search for the top-level directory for CLI flakerefsEelco Dolstra
2020-07-17nix profile diff-closures: Don't inherit EvalCommandEelco Dolstra
2020-07-16Add command 'nix profile diff-closure'Eelco Dolstra
This shows all changes between generations of a profile. E.g. $ nix profile diff-closures --profile /nix/var/nix/profiles/system Generation 654 -> 655: nix: 2.4pre20200617_5d69bbf → 2.4pre20200701_6ff9aa8, +42.2 KiB Generation 655 -> 656: blender-bin: 2.83.0 → 2.83.1, -294.2 KiB Generation 656 -> 657: curl: 7.68.0 → 7.70.0, +19.1 KiB firmware-linux-nonfree: 2020-01-22 → 2020-05-19, +30827.7 KiB ibus: -21.8 KiB initrd-linux: 5.4.46 → 5.4.49 ...
2020-07-16Generations API cleanupEelco Dolstra
2020-07-16nix diff-closures: Fix buildEelco Dolstra
2020-07-16Merge branch 'diff-closures'Eelco Dolstra
2020-07-16Merge remote-tracking branch 'origin/flakes'Eelco Dolstra
2020-07-15nix why-depends: Fix shortest path calculationEelco Dolstra
This was completely broken since d8972317fc4314864619cadd5620ae780da657a3.
2020-07-15nix: Fix examplesEelco Dolstra
2020-07-15nix: Add --derivation flag to operate on .drv pathsEelco Dolstra
For instance, 'nix why-depends --use-derivation nixpkgs#hello nixpkgs#glibc' shows why hello's .drv depends on glibc's .drv.
2020-07-15nix why-depends: Fix misleading messageEelco Dolstra
2020-07-15Clean up RealiseModeEelco Dolstra
2020-07-15Make InstallableStorePath behave consistently with InstallableValueEelco Dolstra
That is, the commands 'nix path-info nixpkgs#hello' and 'nix path-info /nix/store/00ls0qi49qkqpqblmvz5s1ajl3gc63lr-hello-2.10.drv' now do the same thing (i.e. build the derivation and operate on the output store path, rather than the .drv path).
2020-07-15Add 'nix diff-closures' commandEelco Dolstra
This command makes it easier to see what changed between two closures, i.e. what packages/versions got added or removed, and whether there were any notable changes in path size. For example: $ nix diff-closures /nix/var/nix/profiles/system-655-link /nix/var/nix/profiles/system-658-link blender-bin: 2.83.0 → 2.83.2, -294.2 KiB curl: 7.68.0 → 7.70.0, +19.1 KiB firmware-linux-nonfree: 2020-01-22 → 2020-05-19, +30827.7 KiB ibus: -21.8 KiB initrd-linux: 5.4.46 → 5.4.51, +16.9 KiB libexif: 0.6.21 → 0.6.22, +497.6 KiB linux: 5.4.46 → 5.4.51, +13.2 KiB mesa: 19.3.3 → 19.3.5, -183.9 KiB nix: 2.4pre20200701_6ff9aa8 → 2.4pre20200708_9223603, +9.7 KiB nix-bash-completions: 0.6.8 → ∅, -57.6 KiB nixos-system-hagbard: 20.03.20200615.a84b797 → 20.03.20200713.add5529 nvidia-persistenced: 440.82 → 440.100 nvidia-settings: 440.82 → 440.100 nvidia-x11: 440.82-5.4.46 → 440.100-5.4.51, +664.7 KiB pcre: 8.43 → 8.44 php: 7.3.16 → 7.3.20, -26.2 KiB python3.7-youtube-dl: 2020.06.06 → 2020.06.16.1, +8.4 KiB samba: 4.11.5 → 4.11.9, +30.1 KiB sane-backends: 1.0.28 → 1.0.30, +680.5 KiB source: -182.0 KiB zfs-kernel: 0.8.3-5.4.46 → 0.8.4-5.4.51, +9.9 KiB zfs-user: 0.8.3 → 0.8.4, +20.1 KiB
2020-07-15Revert "LocalStore::addToStore(srcPath): Handle the flat case"Eelco Dolstra
This reverts commit a2c27022e9afc394e08d34d349587c8903fc1a97. See addToStoreSlow(), we don't need to handle this case efficiently anymore. In fact, we can almost remove the method/hashAlgo arguments since the non-recursive and/or non-SHA256 are almost not used anymore.
2020-07-14Merge pull request #3809 from Ma27/gitlab-refsEelco Dolstra
Fix gitlab-fetcher to obtain tags and branches
2020-07-14EvalCache: Ignore SQLite errorsEelco Dolstra
Fixes #3794.
2020-07-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-14DohEelco Dolstra
2020-07-13Fix 'nix verify --all' on a binary cache (cached case)Eelco Dolstra
2020-07-13nix verify: Show correct path when using --all on a binary cacheEelco Dolstra
2020-07-13Make 'nix copy' to s3:// binary caches run in constant memoryEelco Dolstra
2020-07-13Fix gitlab-fetcher to obtain tags and branchesMaximilian Bosch
Until now, the `gitlab`-fetcher determined the source's rev by checking the latest commit of the given `ref` using the `/repository/branches`-API. This breaks however when trying to fetch a gitlab-repo by its tag: ``` $ nix repl nix-repl> builtins.fetchTree gitlab:Ma27/nvim.nix/0.2.0 error: --- Error ------------------------------------------------------------------------------------- nix unable to download 'https://gitlab.com/api/v4/projects/Ma27%2Fnvim.nix/repository/branches/0.2.0': HTTP error 404 ('') ``` When using the `/commits?ref_name`-endpoint[1] you can pass any kind of valid ref to the `gitlab`-fetcher. Please note that this fetches the only first 20 commits on a ref, unfortunately there's currently no endpoint which only retrieves the latest commit of any kind of `ref`. [1] https://docs.gitlab.com/ee/api/commits.html#list-repository-commits
2020-07-13Remove istringstream_nocopyEelco Dolstra
2020-07-13Remove 'accessor' from addToStore()Eelco Dolstra
This is only used by hydra-queue-runner and it's better to implement it there.
2020-07-13NarAccessor: Run in constant memoryEelco Dolstra
2020-07-13Make 'nix copy' to file:// binary caches run in constant memoryEelco Dolstra
2020-07-13Store::pathInfoToJSON(): Use consistent format for downloadHashEelco Dolstra
2020-07-13toStorePath(): Return a StorePath and the suffixEelco Dolstra
2020-07-13Fix 'nix verify --all' on a binary cache and add a testEelco Dolstra
2020-07-12Fix ANSI color constantsMaximilian Bosch
The `m` acts as termination-symbol when declaring graphics. Because of this, the `;1m` doesn't have any effect and is directly printed to the console: ``` $ nix repl > builtins.fetchGit { /* ... */ } { outPath = "/nix/store/s0f0iz4a41cxx2h055lmh6p2d5k5bc6r-source"; rev = "e73e45b723a9a6eecb98bd5f3df395d9ab3633b6"; revCount = ;1m428; shortRev = "e73e45b"; submodules = ;1mfalse; } ``` Introduced by 6403508f5a2fcf073b2a0d4e5fcf5f5ebb890384.
2020-07-10Avoid a redundant hashEelco Dolstra
2020-07-10Factor out commonality between nix-prefetch-url and nix-store --add-fixedEelco Dolstra
2020-07-10nix-store --add-fixed: Run in constant memoryEelco Dolstra
2020-07-10nix-prefetch-url: Run in constant memory when using RemoteStoreEelco Dolstra
Fixes #3684.
2020-07-09LocalStore::addToStore(srcPath): Handle the flat caseEelco Dolstra
This helps nix-prefetch-url when using a local store.
2020-07-08CleanupEelco Dolstra
2020-07-08Make LocalStore::addToStore(srcPath) run in constant memoryEelco Dolstra
This reduces memory consumption of nix-instantiate \ -E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \ --option nar-buffer-size 10000 (where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still ensuring that we don't do any write I/O for small source paths (up to 'nar-buffer-size' bytes). The downside is that large paths are now always written to a temporary location in the store, even if they produce an already valid store path. Thus, adding large paths might be slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always restore the old behaviour by setting 'nar-buffer-size' to a very high value.
2020-07-08Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-08Fix 'got unknown message type 1 from Nix daemon'Eelco Dolstra
Example: $ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" { x = runCommand "bar" {} "exit 1"; } "echo foo; exit 1"' warning: unknown setting 'auto-allocate-uids' these 2 derivations will be built: /nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv /nix/store/k4fsvrjl7cp2xpz7927iv7g0dqj1zyhs-foo.drv warning: unknown setting 'auto-allocate-uids' building '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv'... error: --- Error ----------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-daemon builder for '/nix/store/v4fbdbhcdi949929a67g8farwf72zgam-bar.drv' failed with exit code 1 error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------ nix-build got unknown message type 1 from Nix daemon
2020-07-07Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-07Fix coverage buildEelco Dolstra
2020-07-07exportReferencesGraph: Fix support for non-top-level store pathsEelco Dolstra
Fixes #3471.
2020-07-06bumpBen Burdette
2020-07-06revamp trace code and testBen Burdette
2020-07-06nix develop: Support derivations with multiple outputsEelco Dolstra
2020-07-06nix develop: Fall back to "bash" if nixpkgs#bashInteractive is unavailableEelco Dolstra
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-04spacingBen Burdette