about summary refs log tree commit diff
path: root/scratch/brilliant/default.nix
blob: 83c62a3d2eba4bdd538bb221d1d729212618da20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let
  pkgs = import (builtins.fetchGit {
    url = "https://github.com/NixOS/nixpkgs-channels";
    ref = "nixos-20.03";
    rev = "afa9ca61924f05aacfe495a7ad0fd84709d236cc";
  }) {};

  ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: [
    hpkgs.optparse-applicative
    hpkgs.unordered-containers
  ]);
in pkgs.stdenv.mkDerivation {
  name = "transform-keyboard";
  buildInputs = [];
  src = builtins.path {
    path = ./.;
    name = "transform-keyboard-src";
  };
  buildPhase = ''
    ${ghc}/bin/ghc ./Main.hs
  '';
  installPhase = ''
    mkdir -p $out && mv Main $out/transform-keyboard
  '';
}