Hi Chris, For a symlink from the nix store into /etc you would need to use writeText to write a file with the contents (I'm assuming empty string) and then use environment.etc to link that file into /etc; however this would be immutable and swaylock would not be able to modify this file if done this way. I would expect a lock file to be created by the application at runtime, and /etc/pam.d seems like an odd place for a lock file to me.
To change the sway version on build, there's a VERSION parameter in the cmakelists file in the source repo. I'm not familiar with CMAKE, but if you figure out how to set that option on the command line, you could change the buildPhase to call cmake with that variable set instead. I'm guessing the 1970 thing is because it's getting the date modified for the binary and all nix binaries for reproducibility in the store are set to 0 seconds after the epoch for the date. Thanks, Sam On Mon, Jul 10, 2017 at 10:32 AM Chris Duncan via nix-dev < email@example.com> wrote: > Hello, > > I have recently started using NixOS 17.03 and am having fun getting to > know it. I use the Sway window manager and wanted to make some changes to > the current nix package. > > I managed to upgrade to version 0.13.0 of Sway and build the swaylock > application by including pam as a build input. There are two remaining > issues that I am not sure how to solve: > > 1. swaylock did not recognise the password to unlock the screen. This was > because there was no swaylock file created in the /etc/pam.d folder. When I > created this file manually swaylock worked as I expected. Could anybody > help me to understand what I need to do to get this file created during > package installation? > > 2. When I display the Sway version with sway --version it returns 'sway > version (1970-01-01, branch "")'. The difference between this output and > that returned by the package already in nixpkgs is the date. Could anybody > tell me how I can get a sensible date to show up in the version output? > > Any help with the above issues would be much appreciated. Please let me > know if any further information is required. > > -- > *Regards,* > > *Chris* > _______________________________________________ > nix-dev mailing list > firstname.lastname@example.org > https://mailman.science.uu.nl/mailman/listinfo/nix-dev >
_______________________________________________ nix-dev mailing list email@example.com https://mailman.science.uu.nl/mailman/listinfo/nix-dev