Created
October 4, 2018 07:51
-
-
Save infinisil/bb59b5258ccf17801179c249a9bb3342 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Evaluate with nix-instantiate --eval --argstr date 'next friday' --option allow-unsafe-native-code-during-evaluation true --read-write-mode | |
{ date }: | |
with import <nixpkgs> {}; | |
let | |
dateToEpochScript = writeScript "dateToEpoch" '' | |
#!${stdenv.shell} | |
date --date "$1" +%s | |
''; | |
in | |
builtins.exec [ dateToEpochScript date ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment