{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/44086","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/44086/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/44086/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/44086/events","html_url":"https://github.com/NixOS/nixpkgs/pull/44086","id":344408874,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODEwMDAy","number":44086,"title":"paperless: add package and service","user":{"login":"erikarvstedt","id":36110478,"node_id":"MDQ6VXNlcjM2MTEwNDc4","avatar_url":"https://avatars0.githubusercontent.com/u/36110478?v=4","gravatar_id":"","url":"https://api.github.com/users/erikarvstedt","html_url":"https://github.com/erikarvstedt","followers_url":"https://api.github.com/users/erikarvstedt/followers","following_url":"https://api.github.com/users/erikarvstedt/following{/other_user}","gists_url":"https://api.github.com/users/erikarvstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/erikarvstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikarvstedt/subscriptions","organizations_url":"https://api.github.com/users/erikarvstedt/orgs","repos_url":"https://api.github.com/users/erikarvstedt/repos","events_url":"https://api.github.com/users/erikarvstedt/events{/privacy}","received_events_url":"https://api.github.com/users/erikarvstedt/received_events","type":"User","site_admin":false},"labels":[{"id":731735423,"node_id":"MDU6TGFiZWw3MzE3MzU0MjM=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%2011-100","name":"10.rebuild-darwin: 11-100","color":"fbca04","default":false},{"id":731734101,"node_id":"MDU6TGFiZWw3MzE3MzQxMDE=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%2011-100","name":"10.rebuild-linux: 11-100","color":"fbca04","default":false},{"id":292322837,"node_id":"MDU6TGFiZWwyOTIzMjI4Mzc=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/2.status:%20merge%20conflict","name":"2.status: merge conflict","color":"e6e6e6","default":false},{"id":60265212,"node_id":"MDU6TGFiZWw2MDI2NTIxMg==","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false},{"id":9820195,"node_id":"MDU6TGFiZWw5ODIwMTk1","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20python","name":"6.topic: python","color":"fef2c0","default":false},{"id":290122884,"node_id":"MDU6TGFiZWwyOTAxMjI4ODQ=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(update)","name":"8.has: module (update)","color":"009800","default":false},{"id":290122734,"node_id":"MDU6TGFiZWwyOTAxMjI3MzQ=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20package%20(new)","name":"8.has: package (new)","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2018-07-25T11:44:34Z","updated_at":"2018-12-07T08:33:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/44086","html_url":"https://github.com/NixOS/nixpkgs/pull/44086","diff_url":"https://github.com/NixOS/nixpkgs/pull/44086.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/44086.patch"},"body":"###### Notes for reviewers\r\n[Paperless](https://github.com/danielquinn/paperless) has no setup.py, the main way to use it is to call `manage.py` in a properly setup\r\nPython environment. That's what `${paperless}/bin/paperless` does.\r\n\r\nPaperless requires some Python packages that are missing from `nixpkgs`. Currently, they are defined in `extra-python-packages.nix`. Should I add them all to `python-packages.nix`? Do we need an extra git commit for each package?\r\n\r\nHere's a sample script for testing:\r\n```bash\r\ndataDir=/tmp/paperless-data\r\nrm -rf $dataDir\r\n\r\nnix-build --out-link ./paperless - <<EOF\r\n(import <nixpkgs> {}).paperless.withConfig {\r\n  dataDir = $dataDir;\r\n  config = {\r\n    PAPERLESS_DISABLE_LOGIN = \"true\";\r\n  };\r\n}\r\nEOF\r\n\r\n# Setup DB\r\n./paperless migrate\r\n\r\n# Create a test document\r\n$(nix-build --no-out-link '<nixpkgs>' -A imagemagick)/bin/convert \\\r\n  -size 400x40 xc:white -font \"DejaVu-Sans\" -pointsize 20 -fill black -annotate +5+20 \\\r\n  \"hello world 16-10-2005\" $dataDir/consume/doc.png\r\n\r\n# Consume document\r\n./paperless document_consumer --oneshot\r\n\r\n# Start webinterface\r\n./paperless runserver --noreload localhost:8000\r\n\r\n# Cleanup\r\nrm -rf $dataDir ./paperless\r\n```\r\n\r\n\r\n###### Things done\r\n\r\n- [x] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] macOS\r\n   - [ ] other Linux distributions\r\n- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [x] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/445160146","html_url":"https://github.com/NixOS/nixpkgs/pull/44086#issuecomment-445160146","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/44086","id":445160146,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTE2MDE0Ng==","user":{"login":"erikarvstedt","id":36110478,"node_id":"MDQ6VXNlcjM2MTEwNDc4","avatar_url":"https://avatars0.githubusercontent.com/u/36110478?v=4","gravatar_id":"","url":"https://api.github.com/users/erikarvstedt","html_url":"https://github.com/erikarvstedt","followers_url":"https://api.github.com/users/erikarvstedt/followers","following_url":"https://api.github.com/users/erikarvstedt/following{/other_user}","gists_url":"https://api.github.com/users/erikarvstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/erikarvstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikarvstedt/subscriptions","organizations_url":"https://api.github.com/users/erikarvstedt/orgs","repos_url":"https://api.github.com/users/erikarvstedt/repos","events_url":"https://api.github.com/users/erikarvstedt/events{/privacy}","received_events_url":"https://api.github.com/users/erikarvstedt/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T08:33:09Z","updated_at":"2018-12-07T08:33:09Z","author_association":"CONTRIBUTOR","body":"Rebased to `master`."}}
{"actor":{"display_login":"erikarvstedt"}}