add some license headers
[myCabin.git] / default.nix
blob808e7fe1e905f122a0b9b0ab040b8dbdb62ecdf8
1 # Copyright (c) 2018, Jack J. Mao
2 # All rights reserved.
3 # Use of this source code is governed by a BSD-style
4 # license that can be found in the LICENSE file.
6 { pkgs ? import <nixpkgs> { }
7 , mypkgs ? import ./lib/mynix file-args
8 , lib ? pkgs.lib
9 , mylib ? mypkgs.lib
10 , ...
11 }@file-args:
13 with builtins;
14 let
16   inherit (pkgs.stdenv)
17     mkDerivation
18     ;
20   file-args' = file-args // { inherit pkgs lib mypkgs mylib; };
23 mkDerivation {
25   pname = "mycabin";
26   version = "0.0.20240415";
28   meta = with lib; {
29     description = "My last cabin!";
30     homepage = "https://www.func.xyz";
31     license = licenses.bsd3;
32     maintainers = [
33       { name = "Thomas Cat"; email = "thomas.cat@func.xyz"; }
34       { name = "Gerald Mouse"; email = "gerald.mouse@func.xyz"; }
35       { name = "Mammy Two-Shoes"; email = "mammy.twoshoes@func.xyz"; }
36     ];
37     platforms = platforms.all;
38   };
40   src = filterSource
41     (path: type:
42       type != "unknown" && baseNameOf path != ".git" && baseNameOf path != "var"
43     )
44     ./.;
45   buildInputs = [ ];
46   nativeBuildInputs = (with pkgs; [
47     # script
48     deno
49     # golang
50     go_1_21
51     gotools
52     # typescript
53     typescript
54     nodejs
55     mypkgs.rollup #FIXME https://github.com/NixOS/nixpkgs/issues/294183
56     # love2d
57     zip
58   ]);
60   dontConfigure = true;
61   dontStrip = true;
62   dontMoveSbin = true;
63   forceShare = [ ];
65   makeFlags = [ "PREFIX=$(out)" ];
67   shellHook = import ./shell-hook.nix file-args';