summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-08-02 20:56:44 +0200
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-08-02 20:56:44 +0200
commit448046fd26c4f04cecde5b7496eaff746981ec67 (patch)
tree9b4c64cf427be9ba99514a46ceac1c2d92a1561f
downloadtrivstream-448046fd26c4f04cecde5b7496eaff746981ec67.tar
trivstream-448046fd26c4f04cecde5b7496eaff746981ec67.tar.gz
trivstream-448046fd26c4f04cecde5b7496eaff746981ec67.tar.bz2
trivstream-448046fd26c4f04cecde5b7496eaff746981ec67.tar.xz
trivstream-448046fd26c4f04cecde5b7496eaff746981ec67.zip
Framework
-rw-r--r--Setup.hs2
-rw-r--r--default.nix8
-rw-r--r--shell.nix19
-rw-r--r--src/Main.hs4
-rw-r--r--trivstream.cabal21
-rw-r--r--trivstream.nix11
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 @@
1import Distribution.Simple
2main = 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
5rec {
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
5let
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; [ ]);
11in
12pkgs.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 @@
1module Main where
2
3main :: IO ()
4main = 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 @@
1name: trivstream
2version: 0.0.0
3synopsis: A trivial client & server for streaming audio over udp between pulseaudio & jack
4-- description:
5license: GPL-3
6license-file: LICENSE
7author: Gregor Kleen
8maintainer: aethoago@141.li
9-- copyright:
10category: Sound
11build-type: Simple
12extra-source-files: ChangeLog.md
13cabal-version: >=1.10
14
15executable 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 }:
2mkDerivation {
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}