mirror of
https://github.com/BrianHicks/nix-script.git
synced 2024-11-29 10:03:49 +03:00
switch to proper packaging
This commit is contained in:
parent
0061bd6791
commit
2562edd99a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/.nix-script-cache
|
||||
/dist-newstyle
|
||||
/result
|
||||
|
5
CHANGELOG.md
Normal file
5
CHANGELOG.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Revision history for nix-script
|
||||
|
||||
## 0.1.0.0 -- YYYY-mm-dd
|
||||
|
||||
* First version. Released on an unsuspecting world.
|
11
LICENSE
Normal file
11
LICENSE
Normal file
@ -0,0 +1,11 @@
|
||||
Copyright 2021 Brian Hicks
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env runghc
|
||||
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
3
default.nix
Normal file
3
default.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{ sources ? import ./nix/sources.nix { }, pkgs ? import sources.nixpkgs { }, ...
|
||||
}:
|
||||
pkgs.haskellPackages.callCabal2nix "nix-script" ./. { }
|
35
nix-script.cabal
Normal file
35
nix-script.cabal
Normal file
@ -0,0 +1,35 @@
|
||||
cabal-version: >=1.10
|
||||
-- Initial package description 'nix-script.cabal' generated by 'cabal
|
||||
-- init'. For further documentation, see
|
||||
-- http://haskell.org/cabal/users-guide/
|
||||
|
||||
name: nix-script
|
||||
version: 0.1.0.0
|
||||
-- synopsis:
|
||||
-- description:
|
||||
-- bug-reports:
|
||||
-- license:
|
||||
license-file: LICENSE
|
||||
author: Brian Hicks
|
||||
maintainer: brian@brianthicks.com
|
||||
-- copyright:
|
||||
-- category:
|
||||
build-type: Simple
|
||||
extra-source-files: CHANGELOG.md
|
||||
|
||||
executable nix-script
|
||||
main-is: Main.hs
|
||||
-- other-modules:
|
||||
-- other-extensions:
|
||||
build-depends: base >=4.12 && <4.13
|
||||
, base16-bytestring == 0.1.1.6
|
||||
, cryptohash-sha256 == 0.11.101.0
|
||||
, directory == 1.3.3.0
|
||||
, filepath == 1.4.2.1
|
||||
, neat-interpolation == 0.3.2.6
|
||||
, process == 1.6.5.0
|
||||
, relude == 0.5.0
|
||||
, text == 1.2.3.1
|
||||
, utf8-string == 1.0.1.1
|
||||
-- hs-source-dirs:
|
||||
default-language: Haskell2010
|
18
shell.nix
18
shell.nix
@ -4,19 +4,7 @@ let
|
||||
nixpkgs = import sources.nixpkgs { };
|
||||
niv = import sources.niv { };
|
||||
in with nixpkgs;
|
||||
stdenv.mkDerivation {
|
||||
name = "nix-script";
|
||||
buildInputs = [
|
||||
niv.niv
|
||||
git
|
||||
(haskellPackages.ghcWithPackages (ps: [
|
||||
ps.base16-bytestring
|
||||
ps.cryptohash-sha256
|
||||
ps.neat-interpolation
|
||||
ps.relude
|
||||
ps.text
|
||||
ps.utf8-string
|
||||
]))
|
||||
haskellPackages.ormolu
|
||||
];
|
||||
pkgs.mkShell {
|
||||
inputsFrom = [ (haskellPackages.callCabal2nix "nix-script" ./. { }).env ];
|
||||
buildInputs = [ niv.niv git cabal-install haskellPackages.ormolu ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user