Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Evaluate with nix-instantiate --eval --argstr date 'next friday' --option allow-unsafe-native-code-during-evaluation true --read-write-mode
{ date }:
with import <nixpkgs> {};
dateToEpochScript = writeScript "dateToEpoch" ''
date --date "$1" +%s
builtins.exec [ dateToEpochScript date ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.