Commit Graph

103 Commits

Author SHA1 Message Date
Shea Levy
e5f1c7d9bc
Fine-grain NarEffects to the perms we care about. 2019-03-23 10:52:00 -04:00
Shea Levy
f79ba0f8e0
Rewrite NarEffects in terms of RawFilePath.
Nar handling, and Nix in general, only really makes sense in the
context of Unix-style file paths. And even outside of Unix land,
FilePath is a bad interface.

This commit also moves narEffectsIO into a local definition in the
test suite, to avoid a unix dependency in the core library. This
should eventually be moved into a separate library (and defined
directly in terms of the RawFilePath operations).
2019-03-23 10:52:00 -04:00
Shea Levy
cbd0767d61
System.Nix.Nar: Break out fully exported Internal module. 2019-03-23 10:52:00 -04:00
Shea Levy
f2beabb10f
Remove as-yet unused System.Nix.Build 2019-03-23 10:52:00 -04:00
Shea Levy
67f1f0b1fa
Migrate System.Nix.Path to System.Nix.StorePath 2019-03-23 10:49:29 -04:00
Shea Levy
2ad76d2b8b
Fix build on GHC 8.4 2019-03-22 10:00:08 -04:00
Shea Levy
a9312d91d3
Remove now-unused System.Nix.Path 2019-03-22 09:45:19 -04:00
Shea Levy
5a270eff70
NarFormat test: Remove dependency on System.Nix.Path. 2019-03-22 09:43:12 -04:00
Shea Levy
8dd4805936
Hash test: Depend on new StorePath module. 2019-03-22 09:42:33 -04:00
Shea Levy
194261bffa
KnownStoreDir: Note pathiness requirement in haddocks. 2019-03-22 09:40:16 -04:00
Shea Levy
8fa011942e
ReadonlyStore: Update to use new StorePath module. 2019-03-22 09:21:30 -04:00
Shea Levy
aabde18a4a
Move FilePathPart from Path.hs to Nar.hs.
This has nothing to do with store paths...
2019-03-22 08:57:51 -04:00
Shea Levy
03d9a212e8
Remove GC types.
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:52:46 -04:00
Shea Levy
ac24e61148
Remove Derivation types.
These are currently unused and are not going to be needed for initial
hnix support. We can resurrect when we have a use case.
2019-03-22 08:50:47 -04:00
Shea Levy
63643e953a
Remove StoreEffects.
In its current incarnation it is never used, we will resurrect a much
simpler pared-down version based on hnix's actual needs later.
2019-03-22 08:46:43 -04:00
Shea Levy
df43823868
hnix-store-remote: Remove erroneous path putting/getting.
mkPath's logic was completely wrong (tried to make a PathName out of
the entire path, made up a hash based on the whole path rather than
parsing base32) and putPath ignored the store directory and the hash
part.

Much of the code that depended on these functions was actually
correct, but ultimately did the wrong thing. We can resurrect those
from git once the primitives are correctly implemented.
2019-03-22 08:38:09 -04:00
Shea Levy
13e0724344
Remote: Remove unimplemented ops.
We can add implementations later.
2019-03-22 08:38:09 -04:00
Shea Levy
e63bcd61dd
Remove hnix-store-temporary-live-test.
We should use repl modules or proper test suites for things like
this.
2019-03-22 08:38:09 -04:00
Shea Levy
99e7950803
Add type for sets of StorePaths. 2019-03-22 08:38:02 -04:00
Shea Levy
6011a2e1e0
Build.hs: Drop redundant dependency on System.Nix.Path 2019-03-22 08:26:15 -04:00
Shea Levy
6e1e6fc642
Add System.Nix.StorePath, successor to System.Nix.Path.
The new type acknowledges the store root, and is better named.

Future work will migrate all dependents and retire the old module.
2019-03-22 08:26:08 -04:00
Shea Levy
d26c5922cb
Base32: No need to concatMap over singleton lists. 2019-03-20 23:59:02 -04:00
Shea Levy
bd0bd95347
Base32: Document the confusing arithmetic. 2019-03-20 21:49:03 -04:00
Shea Levy
8d1e39acb0
Base32: Lift some helpers up for clarity 2019-03-20 21:37:04 -04:00
Shea Levy
91105c05c6
Lorri + direnv. 2019-03-19 20:52:25 -04:00
Shea Levy
f7fecceeeb
cabal new gitignores. 2019-03-19 20:44:29 -04:00
Shea Levy
0f50f40ffb
Hackage-safe 2019-03-18 17:20:31 -04:00
Shea Levy
79f4c0fa5f
Clean up Hash module. 2019-03-11 23:26:48 -04:00
Shea Levy
44b97fbafb
Hash: Haddock tweaks. 2019-03-11 03:29:58 -04:00
Shea Levy
f3f0193892
Hash: Make warning-clean and reduce language extensions. 2019-03-11 03:29:06 -04:00
Shea Levy
a8aaa9b534
Rename HasDigest to ValidAlgo. 2019-03-11 03:14:34 -04:00
Shea Levy
715f415eb7
Flesh out haddocks for the hashing module. 2019-03-11 03:09:50 -04:00
Shea Levy
b7c2216932
Move bytestring-level base32 encoding to its own module. 2019-03-11 02:42:50 -04:00
Shea Levy
71025ed892
Hash digests: Only export primitives for rendering as hex and base32
The old 'digestText16' was really a special case that doesn't belong
in the hashing module proper.
2019-03-11 02:28:26 -04:00
Shea Levy
3ad41dc6f6
Remove value-level hash algorithms.
We can use NamedHashAlgorithm to get a name where relevant, and soon
the pair of (recursive, Proxy) :: (Bool, Proxy algo) will be replaced
with a separate type which will let us drop the proxies.

Also, we drop logic from addToStore in the remote impl that was copied
from C++ compatibility code for very old daemon versions.
2019-03-10 19:07:17 -04:00
Shea Levy
20e7b039d0
Rename HashAlgoText to NamedAlgo. 2019-03-10 18:51:24 -04:00
Shea Levy
7b918a929a
System.Nix.Hash: Remove unused pragmas and cleanup. 2019-03-10 18:39:20 -04:00
John Ericson
8cc6595803
Merge pull request #31 from haskell-nix/je-printHashBytes32-bit-fiddling
Weird bit fiddling to make `printHashBytes32` work
2019-03-10 13:35:29 -04:00
John Ericson
3fde7c1580 Merge remote-tracking branch 'origin/master' into add-to-store 2019-03-10 13:21:18 -04:00
Doug Beardsley
8965dc85bf
Merge pull request #32 from haskell-nix/readonly-store-hash
Implement readonly store path hashing
2019-03-10 13:13:01 -04:00
John Ericson
ecf4d991f9 Add comment to the mysterious order of the + 1 - 1 in printHashBytes32 2019-03-10 13:09:45 -04:00
John Ericson
9bbe54a03b Add test corresponding to builtins.placeholder "foo" in layer above
We were hashing correctly, but base32-ing wrong.
2019-03-10 12:30:26 -04:00
Greg Hale
cf9fbf06c8 Fix addToStore message encoding and do some cleanup 2019-03-10 10:29:17 -04:00
Doug Beardsley
7067c32a9a Implement readonly store path hashing 2019-03-09 22:42:23 -05:00
John Ericson
0fe7ff5e84 Weird bit fiddling to make printHashBytes32 work 2019-03-09 22:03:28 -05:00
Shea Levy
0367156509
Local shell.nixes to make flycheck happy. 2019-03-09 19:04:11 -05:00
Shea Levy
440dfebc28
Build expressions. 2019-03-09 18:32:01 -05:00
Greg Hale
b8568a4549 Merge branch 'add-to-store' of github.com:haskell-nix/hnix-store into add-to-store 2019-03-09 11:39:59 -05:00
Greg Hale
547165d22e Add useful garbage 2019-03-09 11:32:23 -05:00
Greg Hale
759abd9f94 nareffetsio for addToStore in hnix-store-remote 2018-12-28 19:28:11 -05:00