Unverified Commit 1b005c90 authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #214594 from dotlambda/rmfuse-no-poetry2nix

rmfuse: don't use poetry2nix
parents e8b67bd8 7d113c2f
Loading
Loading
Loading
Loading
+43 −38
Original line number Diff line number Diff line
{ poetry2nix, pkgs, lib }:
{ lib
, python3
, fetchFromGitHub
}:

let
  pythonPackages = (poetry2nix.mkPoetryPackages {
    projectDir = ./.;
    overrides = [
      poetry2nix.defaultPoetryOverrides
      (import ./poetry-git-overlay.nix { inherit pkgs; })
      (self: super: {
python3.pkgs.buildPythonApplication rec {
  pname = "rmfuse";
  version = "unstable-2021-06-06";

        rmfuse = super.rmfuse.overridePythonAttrs(old: {
          meta = old.meta // {
            description = "RMfuse provides access to your reMarkable Cloud files in the form of a FUSE filesystem.";
            longDescription = ''
              RMfuse provides access to your reMarkable Cloud files in the form of a FUSE filesystem. These files are exposed either in their original format, or as PDF files that contain your annotations. This lets you manage files in the reMarkable Cloud using the same tools you use on your local system.
            '';
            license = lib.licenses.mit;
            homepage = "https://github.com/rschroll/rmfuse";
            maintainers = [ lib.maintainers.adisbladis ];
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "rschroll";
    repo = "rmfuse";
    rev = "3796b8610c8a965a60a417fc0bf8ea5200b71fd2";
    hash = "sha256-W3kS6Kkmp8iWMOYFL7r1GyjSQvFotBXQCuTMK0vyHQ8=";
  };
        });

        reportlab = let
          ft = pkgs.freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; });
        in super.reportlab.overridePythonAttrs(old: {
  postPatch = ''
            substituteInPlace setup.py \
              --replace "mif = findFile(d,'ft2build.h')" "mif = findFile('${lib.getDev ft}','ft2build.h')"
    substituteInPlace pyproject.toml \
      --replace 'bidict = "^' 'bidict = ">='
  '';

          NIX_CFLAGS_COMPILE = "-I${pkgs.freetype}/include/freetype2";

          nativeBuildInputs = old.nativeBuildInputs ++ [
            pkgs.pkg-config
          ];
          buildInputs = old.buildInputs ++ [
            pkgs.freetype
  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];
        });

      })
  propagatedBuildInputs = with python3.pkgs; [
    bidict
    rmrl
    rmcl
    pyfuse3
    xdg
  ];
  }).python.pkgs;
in pythonPackages.rmfuse

  meta = {
    description = "FUSE access to the reMarkable Cloud";
    homepage = "https://github.com/rschroll/rmfuse";
    license = lib.licenses.mit;
    longDescription = ''
      RMfuse provides access to your reMarkable Cloud files in the form of a
      FUSE filesystem. These files are exposed either in their original format,
      or as PDF files that contain your annotations. This lets you manage files
      in the reMarkable Cloud using the same tools you use on your local
      system.
    '';
    maintainers = with lib.maintainers; [ adisbladis ];
  };
}
+0 −14
Original line number Diff line number Diff line
{ pkgs }:
self: super: {

  rmfuse = super.rmfuse.overridePythonAttrs (
    _: {
      src = pkgs.fetchgit {
        url = "https://github.com/rschroll/rmfuse.git";
        rev = "3796b8610c8a965a60a417fc0bf8ea5200b71fd2";
        sha256 = "03qxy95jpk741b81bd38y51d4a0vynx2y1g662bci9r6m7l14yav";
      };
    }
  );

}
+0 −596

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −15
Original line number Diff line number Diff line
[tool.poetry]
name = "rmfuse-env"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.8"
rmfuse = {git = "https://github.com/rschroll/rmfuse.git", extras = ["pyfuse3"]}

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
+0 −5
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p poetry poetry2nix.cli
set -eu
poetry lock
poetry2nix lock