Guest User

Untitled

a guest
Oct 24th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. # Fine as a path...
  2. nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) /nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source
  3. "/nix/store/lbz71ain5rbm2l8s45nl6d48rvlgspjc-6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
  4.  
  5. # Or a string...
  6. nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) "/nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
  7. "/nix/store/lbz71ain5rbm2l8s45nl6d48rvlgspjc-6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
  8.  
  9. # But this fails:
  10. nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) (builtins.fetchGit ./.)
  11. fetching Git repository '/home/kreisys/src/silly-test'warning: no common commits
  12. error: string '/nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source' cannot refer to other paths, at (string):1:1
Advertisement
Add Comment
Please, Sign In to add comment