diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | Pull requests | README | LICENSE

NIX.md (1002B)


      1 # Nix documentation
      2 Follow the instructions here when developing or building on/for Nix.
      3 
      4 ## Notes for nightly builds
      5 Before building or installing the unstable release, replace the hash of the
      6 current HEAD in the nix expression file.
      7 
      8 ```bash
      9 hash=$(nix-prefetch-git --quiet https://git.in0rdr.ch/diary.git | jq -r .hash)
     10 sed -i "s~<PREFETCH_HASH>~$hash~" nix/diary-unstable.nix
     11 ```
     12 
     13 ## Build instructions
     14 To build the (un)stable packages for Nix:
     15 
     16 ```bash
     17 # Build stable package
     18 nix-build nix/diary.nix
     19 
     20 # Build latest nightly version
     21 nix-build nix/diary-unstable.nix
     22 ```
     23 
     24 ## Installation instructions
     25 To install the package from the expression file to the user environment:
     26 ```bash
     27 # Install stable package
     28 nix-env -i -f nix/diary.nix
     29 
     30 # Install latest nightly version
     31 nix-env -i -f nix/diary-unstable.nix
     32 ```
     33 
     34 ## Development environment
     35 To prepare a nix shell as a dev environment, use the `shell.nix`:
     36 * https://nixos.wiki/wiki/Development_environment_with_nix-shell
     37 
     38 ```bash
     39 cd nix
     40 nix-shell
     41 ```