Unverified Commit 13c756ea authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

linuxPackages.shufflecake: use wrapped gcc compiler (#458585)

parents b4ebab3f 2467e933
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
@@ -9,13 +9,14 @@
}:
stdenv.mkDerivation (finalAttrs: {
  name = "shufflecake";
  version = "0.5.2";
  version = "0.5.5";

  src = fetchFromGitea {
    domain = "codeberg.org";
    owner = "shufflecake";
    repo = "shufflecake-c";
    rev = "v${finalAttrs.version}";
    hash = "sha256-EF9VKaqcNJt3hd/CUT+QeW17tc5ByStDanGGwi4uL4s=";
    hash = "sha256-xVuI7tRARPFuETCCKYt507WpvZVZLaj9dhBkhJ03zc8=";
  };

  nativeBuildInputs = kernel.moduleBuildDependencies;
@@ -23,13 +24,17 @@ stdenv.mkDerivation (finalAttrs: {
    libgcrypt
    lvm2
  ];
  makeFlags = kernelModuleMakeFlags ++ [
  makeFlags =
    kernelModuleMakeFlags
    ++ [
      "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
    ]
    # Use wrapped gcc compiler since the unwrapped one fails to find the
    # headers.
    ++ lib.optionals stdenv.cc.isGNU [
      "CC=${stdenv.cc.targetPrefix}cc"
    ];

  # GCC 14 makes this an error by default, remove when fixed upstream
  env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";

  outputs = [
    "out"
    "bin"
@@ -40,13 +45,13 @@ stdenv.mkDerivation (finalAttrs: {
    install -Dm555 shufflecake $bin/shufflecake
  '';

  meta = with lib; {
  meta = {
    description = "Plausible deniability (hidden storage) layer for Linux";
    homepage = "https://shufflecake.net";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ oluceps ];
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [ oluceps ];
    outputsToInstall = [ "bin" ];
    platforms = platforms.linux;
    platforms = lib.platforms.linux;
    broken = kernel.kernelOlder "6.1" || kernel.meta.name == "linux-lqx-6.12.1";
  };
})