-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
267f8e5
commit 7402051
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
------------------------------------------------------ | ||
title: evil-nix: download files without requiring a hash | ||
summary: A Nix library that allows downloading files without requiring a hash, even in pure-eval mode | ||
tags: nixos | ||
draft: false | ||
------------------------------------------------------ | ||
|
||
I recently released a Nix library called | ||
[`evil-nix`](https://github.com/cdepillabout/evil-nix). It allows downloading | ||
files without requiring a hash on the file. It even works in Nix's | ||
[`pure-eval`](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-pure-eval) | ||
mode. | ||
|
||
`evil-nix` exploits Nix support for unsafe hash functions (like SHA1) in | ||
fixed-output derivations. It uses SHA1 hash collisions to sneak data from the | ||
internet out of fixed-output derivations. | ||
|
||
Due to the implementation, `evil-nix` is extremely inefficient with downloading | ||
files. I don't recommend the library to actually be used in practice, but it is | ||
a neat trick. | ||
|
||
Take a look at the [README.md](https://github.com/cdepillabout/evil-nix#readme) | ||
for more information. |