Last active
September 18, 2018 09:59
-
-
Save erikarvstedt/9b201b2011426a03e72af75acd07d7da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paperless=$(nix-build --no-out-link -E - <<'EOF' | |
with (import <nixpkgs> {}); | |
let | |
pkgs = import (fetchFromGitHub { | |
owner = "erikarvstedt"; | |
repo = "nixpkgs"; | |
rev = "paperless-django2"; | |
sha256 = "1wcrsf7ai8m5r855dcdw434qs8zc96bc5zw8y2zpya3jxr1spc8i"; | |
}) {}; | |
localPaperless = localSrc: config: let | |
paperless = pkgs.paperless-django2.withConfig config; | |
in | |
writeScript "paperless" '' | |
#!${stdenv.shell} -e | |
${paperless.setupEnv} | |
exec python ${toString localSrc}/src/manage.py "$@" | |
''; | |
in | |
########################################################### | |
############ Change this to your source path ############# | |
localPaperless /my/local/src/paperless { | |
dataDir = /tmp/paperless-django2-localsrc; | |
config = { | |
PAPERLESS_DISABLE_LOGIN = "true"; | |
}; | |
} | |
EOF | |
) | |
$paperless migrate | |
$paperless runserver --noreload localhost:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment