Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Fine as a path...
- nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) /nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source
- "/nix/store/lbz71ain5rbm2l8s45nl6d48rvlgspjc-6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
- # Or a string...
- nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) "/nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
- "/nix/store/lbz71ain5rbm2l8s45nl6d48rvlgspjc-6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source"
- # But this fails:
- nix-repl> builtins.filterSource (path: _: ! lib.hasSuffix ".nix" (baseNameOf path)) (builtins.fetchGit ./.)
- fetching Git repository '/home/kreisys/src/silly-test'warning: no common commits
- error: string '/nix/store/6b8dw1qsvp9gv8yswcb0za37kh4zagl0-source' cannot refer to other paths, at (string):1:1
Advertisement
Add Comment
Please, Sign In to add comment