let's make this a haskell project
- I got fed up with Python in a simple project, why use it again?
This commit is contained in:
parent
506a5dea83
commit
30da2a0247
22
setup.py
22
setup.py
|
@ -1,22 +0,0 @@
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
requires = [
|
|
||||||
'aiohttp',
|
|
||||||
'aiofiles',
|
|
||||||
'aiodns'
|
|
||||||
]
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='chandelorean',
|
|
||||||
version='0.0.1',
|
|
||||||
description="Imageboard style forum that lets you time travel. Meant to be an archive.",
|
|
||||||
classifiers=[
|
|
||||||
"Programming Language :: Python",
|
|
||||||
"Topic :: Internet :: WWW/HTTP",
|
|
||||||
],
|
|
||||||
author='Zer0-',
|
|
||||||
author_email='paul_cockshott@protonmail.com',
|
|
||||||
packages=['chandelorean'],
|
|
||||||
include_package_data=True,
|
|
||||||
install_requires=requires,
|
|
||||||
)
|
|
41
shell.nix
41
shell.nix
|
@ -1,15 +1,34 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
||||||
|
|
||||||
let
|
let
|
||||||
shell = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs;
|
inherit (nixpkgs) pkgs;
|
||||||
[
|
|
||||||
python3
|
f = { mkDerivation, base, stdenv, cabal-install,
|
||||||
postgresql
|
aeson
|
||||||
#python3Packages.regex
|
}:
|
||||||
];
|
mkDerivation {
|
||||||
};
|
pname = "chan-delorean";
|
||||||
|
version = "0.0.0.0";
|
||||||
|
src = ./.;
|
||||||
|
isLibrary = false;
|
||||||
|
isExecutable = true;
|
||||||
|
executableHaskellDepends = [
|
||||||
|
base safe-exceptions aeson
|
||||||
|
];
|
||||||
|
testHaskellDepends = [ cabal-install ];
|
||||||
|
license = "unknown";
|
||||||
|
};
|
||||||
|
|
||||||
|
haskellPackages = if compiler == "default"
|
||||||
|
then pkgs.haskellPackages
|
||||||
|
else pkgs.haskell.packages.${compiler};
|
||||||
|
|
||||||
|
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
|
||||||
|
|
||||||
|
drv = variant (haskellPackages.callPackage f {
|
||||||
|
req = req;
|
||||||
|
});
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
shell
|
if pkgs.lib.inNixShell then drv.env else drv
|
||||||
|
|
Loading…
Reference in New Issue