lix/src/libfetchers
Maximilian Bosch 34e20c164c
libfetchers/path: set lastModified to path's mtime
When importing e.g. a local `nixpkgs` in a flake to test a change like

    {
      inputs.nixpkgs.url = path:/home/ma27/Projects/nixpkgs;
      outputs = /* ... */
    }

then the input is missing a `lastModified`-field that's e.g. used in
`nixpkgs.lib.nixosSystem`. Due to the missing `lastMoified`-field, the
mtime is set to 19700101:

    result -> /nix/store/b7dg1lmmsill2rsgyv2w7b6cnmixkvc1-nixos-system-nixos-22.05.19700101.dirty

With this change, the `path`-fetcher now sets a `lastModified` attribute
to the `mtime` just like it's the case in the `tarball`-fetcher already.
When building NixOS systems with `nixpkgs` being a `path`-input and this
patch, the output-path now looks like this:

    result -> /nix/store/ld2qf9c1s98dxmiwcaq5vn9k5ylzrm1s-nixos-system-nixos-22.05.20220217.dirty
2022-03-15 12:32:11 +01:00
..
attrs.cc Fix conversion from JSON to fetch attributes 2021-01-05 02:06:25 +00:00
attrs.hh fix error: 'optional' in namespace 'std' does not name a template type 2021-06-02 18:09:03 +08:00
cache.cc libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
cache.hh libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
fetch-settings.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
fetch-settings.hh Point to new github oauth docs url 2022-03-06 17:01:14 -06:00
fetchers.cc libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
fetchers.hh libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
git.cc Style 2022-03-11 11:19:21 +01:00
github.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
indirect.cc InputScheme::fetch(): Return a StorePath instead of a Tree 2022-02-16 11:14:01 +01:00
local.mk Don't overwrite user provided lib*_LDFLAGS 2021-08-25 08:59:19 -07:00
mercurial.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
path.cc libfetchers/path: set lastModified to path's mtime 2022-03-15 12:32:11 +01:00
registry.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
registry.hh Style tweaks 2021-07-07 10:02:55 +02:00
tarball.cc libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00