Unverified Commit 665cb0e0 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

surface-control: 0.4.3-2 -> 0.4.7-1 (#386296)

parents 8d60e1de 58e9b89d
Loading
Loading
Loading
Loading
+9 −12
Original line number Diff line number Diff line
@@ -10,41 +10,38 @@

rustPlatform.buildRustPackage rec {
  pname = "surface-control";
  version = "0.4.3-2";
  version = "0.4.7-1";

  src = fetchFromGitHub {
    owner = "linux-surface";
    repo = "surface-control";
    rev = "v${version}";
    sha256 = "sha256-QgkUxT5Ae0agvalZl1ie+1LwxgaTzMrKpQY3KkpWwG4=";
    tag = "v${version}";
    hash = "sha256-3XTG63zjCZVuTCPvDCpl5ZNPf57r6dctEfgTu0hkznM=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-BBEdX/VSTYYIusLkqUZOxmf5pTMbF4v7LjlQxy8RV3Y=";

  cargoHash = "sha256-YE20/3emZ6pveEeRgVXVrNvykpEs+wvnHSsrMLEZTdk=";

  nativeBuildInputs = [
    pkg-config
    installShellFiles
  ];

  buildInputs = [ udev ];

  postInstall = ''
    installShellCompletion \
      $releaseDir/build/surface-*/out/surface.{bash,fish} \
      --zsh $releaseDir/build/surface-*/out/_surface
    install -Dm 0444 -t $out/etc/udev/rules.d \
      etc/udev/40-surface-control.rules
    substituteInPlace $out/etc/udev/rules.d/40-surface-control.rules \
      --replace "/usr/bin/chmod" "${coreutils}/bin/chmod" \
      --replace "/usr/bin/chown" "${coreutils}/bin/chown"
  '';

  meta = with lib; {
  meta = {
    description = "Control various aspects of Microsoft Surface devices on Linux from the Command-Line";
    homepage = "https://github.com/linux-surface/surface-control";
    license = licenses.mit;
    license = lib.licenses.mit;
    maintainers = [ ];
    platforms = platforms.linux;
    platforms = lib.platforms.linux;
    mainProgram = "surface";
  };
}