unpacking 'https://example.com/nixexprs.tar.xz'...
tar: Error opening archive: Failed to open '/nix/store/411sszfqfya5ad2wllmqcr15z5d30575-nixexprs.tar.xz'
error: program 'tar' failed with exit code 1
Discussion:
{ config, pkgs, ... }: | |
let | |
myCustomChannel = import <myCustomChannel> | |
{ inherit pkgs; }; | |
in { | |
imports = [ (import <myCustomChannel/myCustomModule.nix> { inherit myCustomChannel; }) ]; | |
} |
{ | |
fixup = options: name: file: stdenvNoCC.mkDerivation | |
( options // | |
{ inherit name; | |
installPhase = | |
''cp -r ${file} $out | |
''; | |
} | |
); | |
wrap = { paths ? [], vars ? {}, file ? null, script ? null, name ? "wrap" }: |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. | |
# |
#!/usr/bin/env bash | |
nix-env -ir -E "args: (import <nixpkgs> {}).lib.toDerivation $1" |
#!/usr/bin/env bash | |
git log --format=%B -n 1 HEAD > ._GIT_EXTRACT_MSG && git reset --soft HEAD^ && git reset HEAD && git commit --allow-empty -F ._GIT_EXTRACT_MSG && rm ._GIT_EXTRACT_MSG |
unpacking 'https://example.com/nixexprs.tar.xz'...
tar: Error opening archive: Failed to open '/nix/store/411sszfqfya5ad2wllmqcr15z5d30575-nixexprs.tar.xz'
error: program 'tar' failed with exit code 1
Discussion:
#! /usr/bin/env bash | |
NIX_STORE=${NIX_STORE:-"/nix/store"}; | |
store_path=$1; | |
# check if path is actually broken | |
if nix-store --verify-path $store_path; then exit 0; fi; | |
# abuse --check flag to get a fresh, non-substituted rebuild of the path | |
# TODO: GC? |
I created these small git commands to help make exploring commits and editing them easier.
The first set of commands, git uc
(Undo Commit) and git rc
(Redo Commit), will undo a commit while saving the commit message and keeping the changes staged, so you can make changes to the commit and re-perform the commit while having the original commit message restored. Example:
$ git uc
...make edits to staged changes...
$ git rc
...update commit message, original one is loaded into editor...