~kaction/config

ref: milestone/1 config/default.nix -rw-r--r-- 713 bytes
8f4e28c9 — Dmitry Bogatov vim: drop custom implementation of snippets 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
let
  pkgs = import(fetchTarball{
    url = "https://github.com/NixOS/nixpkgs/archive/696c6bed4e8e2d9fd9b956dea7e5d49531e9d13f.tar.gz";
    sha256 = "1v3yrpj542niyxp0h3kffsdjwlrkvj0mg4ljb85d142gyn3sdzd4";
  }){};
  tup = (import ./nix/tup-0.7.8.nix) pkgs;
in pkgs.stdenv.mkDerivation {

  name = "config.tgz";
  src  = pkgs.fetchgitLocal ./.;
  buildInputs = with pkgs; [ tup m4 vim fuse ncurses ];
  buildPhase  = ''
    tup --version
    tup init
    tup generate build.sh
    ./build.sh
  '';
  installPhase = ''
    mkdir -p $out/share/config.tgz/ $out/bin
    tar -xzf out/config.tar.gz -C $out/share/config.tgz/
    mv $out/share/config.tgz/.local/bin $out/bin
    cp nix/config.tgz-deploy $out/bin
  '';
}