default.nix (830B)
1 { 2 lib, 3 stdenv, 4 fetchFromSourcehut, 5 }: 6 7 stdenv.mkDerivation (finalAttrs: { 8 pname = "sled"; 9 version = "0.19.2"; 10 11 src = fetchFromSourcehut { 12 owner = "~strahinja"; 13 repo = "sled"; 14 rev = "v${finalAttrs.version}"; 15 hash = "sha256-C/iRne2khZ31meZJ85AsEGMN7dTSOZ8CyIWQVBugT6Q="; 16 }; 17 18 postPatch = '' 19 substituteInPlace sled.c \ 20 --replace-fail "open(to, O_WRONLY | O_CREAT | O_TRUNC)" "open(to, O_WRONLY | O_CREAT | O_TRUNC, 0644)" 21 ''; 22 23 FALLBACKVER = finalAttrs.version; 24 25 installFlags = [ "PREFIX=$(out)" ]; 26 27 meta = { 28 description = "Simple text editor"; 29 homepage = "https://strahinja.srht.site/sled"; 30 license = lib.licenses.gpl3Plus; 31 maintainers = [ lib.maintainers.sikmir ]; 32 platforms = lib.platforms.linux; 33 skip.ci = stdenv.isDarwin; 34 mainProgram = "sled"; 35 }; 36 })