Skip to content

Commit 4b7ce24

Browse files
committed
Prepare for release
1 parent 13e316e commit 4b7ce24

File tree

4 files changed

+42
-3
lines changed

4 files changed

+42
-3
lines changed

LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2019 Nicolas Mattia
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

default.nix

+17-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ with rec
1313
};
1414
niv-source = sourceByRegex "niv" ./.
1515
[ "^package.yaml$"
16+
"^README.md$"
17+
"^LICENSE$"
1618
"^app$"
1719
"^app.*.hs$"
1820
"^src$"
@@ -24,11 +26,25 @@ with rec
2426
"^nix$"
2527
"^nix.sources.nix$"
2628
];
29+
2730
haskellPackages = pkgs.haskellPackages.override
2831
{ overrides = _: haskellPackages:
2932
{ niv = haskellPackages.callCabal2nix "niv" niv-source {}; };
3033
};
3134

35+
niv = haskellPackages.niv;
36+
37+
niv-sdist = pkgs.haskell.lib.sdistTarball niv;
38+
39+
niv-cabal-upload =
40+
with
41+
{ niv-version = niv.version;
42+
};
43+
pkgs.writeScript "cabal-upload"
44+
''
45+
cabal upload "$@" "${niv-sdist}/niv-${niv-version}.tar.gz"
46+
'';
47+
3248
niv-devshell = haskellPackages.shellFor
3349
{ packages = (ps: [ ps.niv ]);
3450
shellHook =
@@ -45,8 +61,7 @@ with rec
4561

4662
};
4763
rec
48-
{ inherit niv-source niv-devshell;
49-
inherit (haskellPackages) niv;
64+
{ inherit niv niv-sdist niv-source niv-devshell niv-cabal-upload;
5065

5166
tests = pkgs.callPackage ./tests { inherit niv; };
5267

package.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: niv
2-
2+
version: 0.1.0
33
license: MIT
4+
author: Nicolas Mattia <[email protected]>
5+
maintainer: Nicolas Mattia <[email protected]>
6+
copyright: (c) 2019 Nicolas Mattia
7+
category: Development
8+
github: deckgo/wai-lambda
9+
synopsis: Easy dependency management for Nix projects
10+
description: Easy dependency management for Nix projects.
411

512
ghc-options:
613
- -Wall
@@ -9,6 +16,9 @@ ghc-options:
916
# For macOS: https://github.com/gibiansky/IHaskell/issues/942
1017
- -optP-Wno-nonportable-include-path
1118

19+
extra-source-files:
20+
- README.md
21+
1222
dependencies:
1323
- aeson
1424
- aeson-pretty

script/upload

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env nix-shell
2+
#!nix-shell -I nixpkgs=./nix
3+
#!nix-shell -i bash -p cabal-install -p nix -p curl --pure
4+
#!nix-shell --keep SSL_CERT_FILE
5+
# vim: filetype=sh
6+
7+
$(nix-build -A niv-cabal-upload) "$@"

0 commit comments

Comments
 (0)