diff options
-rw-r--r-- | Setup.hs | 2 | ||||
-rw-r--r-- | default.nix | 8 | ||||
-rw-r--r-- | shell.nix | 19 | ||||
-rw-r--r-- | src/Main.hs | 4 | ||||
-rw-r--r-- | trivstream.cabal | 21 | ||||
-rw-r--r-- | trivstream.nix | 11 |
6 files changed, 65 insertions, 0 deletions
diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs | |||
@@ -0,0 +1,2 @@ | |||
1 | import Distribution.Simple | ||
2 | main = defaultMain | ||
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..26a2c3b --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,8 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | ||
2 | , compilerName ? "ghc801" | ||
3 | }: | ||
4 | |||
5 | rec { | ||
6 | haskellPackages = pkgs.haskell.packages."${compilerName}"; | ||
7 | trivstream = haskellPackages.callPackage ./trivstream.nix {}; | ||
8 | } | ||
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6ed4ca8 --- /dev/null +++ b/shell.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { pkgs ? (import <nixpkgs> {}) | ||
2 | , haskellPackages ? (import ./default.nix {}).haskellPackages | ||
3 | }: | ||
4 | |||
5 | let | ||
6 | trivstreamPackages = builtins.attrValues (import ./default.nix {}); | ||
7 | ghc = haskellPackages.ghcWithPackages | ||
8 | (ps: trivstreamPackages ++ utilities ps ++ testDeps ps); | ||
9 | utilities = (ps: with ps; [ hlint cabal2nix ]); | ||
10 | testDeps = (ps: with ps; [ ]); | ||
11 | in | ||
12 | pkgs.stdenv.mkDerivation rec { | ||
13 | name = "trivstream-env"; | ||
14 | buildInputs = [ ghc ]; | ||
15 | shellHook = '' | ||
16 | eval $(egrep ^export ${ghc}/bin/ghc) | ||
17 | export PROMPT_INFO="${name}" | ||
18 | ''; | ||
19 | } | ||
diff --git a/src/Main.hs b/src/Main.hs new file mode 100644 index 0000000..c2e4af9 --- /dev/null +++ b/src/Main.hs | |||
@@ -0,0 +1,4 @@ | |||
1 | module Main where | ||
2 | |||
3 | main :: IO () | ||
4 | main = undefined | ||
diff --git a/trivstream.cabal b/trivstream.cabal new file mode 100644 index 0000000..7b257c8 --- /dev/null +++ b/trivstream.cabal | |||
@@ -0,0 +1,21 @@ | |||
1 | name: trivstream | ||
2 | version: 0.0.0 | ||
3 | synopsis: A trivial client & server for streaming audio over udp between pulseaudio & jack | ||
4 | -- description: | ||
5 | license: GPL-3 | ||
6 | license-file: LICENSE | ||
7 | author: Gregor Kleen | ||
8 | maintainer: aethoago@141.li | ||
9 | -- copyright: | ||
10 | category: Sound | ||
11 | build-type: Simple | ||
12 | extra-source-files: ChangeLog.md | ||
13 | cabal-version: >=1.10 | ||
14 | |||
15 | executable trivstream | ||
16 | main-is: Main.hs | ||
17 | -- other-modules: | ||
18 | -- other-extensions: | ||
19 | build-depends: base >=4.9 && <5 | ||
20 | hs-source-dirs: src | ||
21 | default-language: Haskell2010 | ||
diff --git a/trivstream.nix b/trivstream.nix new file mode 100644 index 0000000..2521a88 --- /dev/null +++ b/trivstream.nix | |||
@@ -0,0 +1,11 @@ | |||
1 | { mkDerivation, base, stdenv }: | ||
2 | mkDerivation { | ||
3 | pname = "trivstream"; | ||
4 | version = "0.0.0"; | ||
5 | src = ./.; | ||
6 | isLibrary = false; | ||
7 | isExecutable = true; | ||
8 | executableHaskellDepends = [ base ]; | ||
9 | description = "A trivial client & server for streaming audio over udp between pulseaudio & jack"; | ||
10 | license = stdenv.lib.licenses.gpl3; | ||
11 | } | ||