gladiusmaximus

Untitled

Sep 13th, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. $ cat flake.nix
  2. {
  3. description = "Application packaged using poetry2nix";
  4.  
  5. inputs.flake-utils.url = "github:numtide/flake-utils";
  6. inputs.nixpkgs.url = "github:NixOS/nixpkgs";
  7. inputs.poetry2nix.url = "github:nix-community/poetry2nix";
  8.  
  9. outputs = { self, nixpkgs, flake-utils, poetry2nix }:
  10. {
  11. # Nixpkgs overlay providing the application
  12. overlay = nixpkgs.lib.composeManyExtensions [
  13. poetry2nix.overlay
  14. (final: prev: {
  15. # The application
  16. myapp = prev.poetry2nix.mkPoetryApplication {
  17. projectDir = ./.;
  18. };
  19. myenv = prev.poetry2nix.mkPoetryEnv {
  20. projectDir = ./.;
  21. };
  22. })
  23. ];
  24. } // (flake-utils.lib.eachDefaultSystem (system:
  25. let
  26. pkgs = import nixpkgs {
  27. inherit system;
  28. overlays = [ self.overlay ];
  29. };
  30. in
  31. rec {
  32. apps = {
  33. myapp = pkgs.myapp;
  34. };
  35.  
  36. devShell = pkgs.myenv;
  37. defaultApp = apps.myapp;
  38. }));
  39. }
  40.  
  41. $ cat poetry.toml
  42. [[package]]
  43. name = "sly"
  44. version = "0.4"
  45. description = "SLY - Sly Lex Yacc"
  46. category = "main"
  47. optional = false
  48. python-versions = "*"
  49.  
  50. [package.extras]
  51. test = ["pytest", "regex"]
  52.  
  53. [metadata]
  54. lock-version = "1.1"
  55. python-versions = "^3.8"
  56. content-hash = "848dc9cdd8c412a60674d1709c1e95a9f70d16c69c8ab0e918d3cc05d64249e5"
  57.  
  58. [metadata.files]
  59. sly = [
  60. {file = "sly-0.4.tar.gz", hash = "sha256:e5f2266a231322cc17519fbc3a3ba1c6335fed5a9a55abe0e598a35aea0ac32a"},
  61. ]
  62.  
Advertisement
Add Comment
Please, Sign In to add comment