push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
zlib,
bzip2,
lzo,
lz4,
zstd,
xz,
libgcrypt,
e2fsprogs,
util-linux,
libgpg-error,
}:
let
version = "0.8.8";
in
stdenv.mkDerivation {
pname = "fsarchiver";
inherit version;
src = fetchFromGitHub {
owner = "fdupoux";
repo = "fsarchiver";
rev = version;
sha256 = "sha256-bEwNqPQRpjfOVTUog9wsZfS5yQ7Z21pHolPRLlbzHAA=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
zlib
bzip2
xz
lzo
lz4
zstd
xz
libgcrypt
e2fsprogs
util-linux
libgpg-error
];
meta = with lib; {
description = "File system archiver for linux";
longDescription = ''
FSArchiver is a system tool that allows you to save the contents of a
file-system to a compressed archive file. The file-system can be restored
on a partition which has a different size and it can be restored on a
different file-system. Unlike tar/dar, FSArchiver also creates the
file-system when it extracts the data to partitions. Everything is
checksummed in the archive in order to protect the data. If the archive is
corrupt, you just loose the current file, not the whole archive.
'';
homepage = "https://www.fsarchiver.org/";
license = licenses.lgpl2;
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "fsarchiver";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "fsatrace";
version = "0.0.5";
src = fetchFromGitHub {
owner = "jacereda";
repo = "fsatrace";
rev = "5af79511828ca6cea4e5dd9f28e1676fb0b705e9";
"hash" = "sha256-pn07qlrRaM153znEviziuKWrkX9cLsNFCujovmE4UUA=";
};
installDir = "libexec/${pname}-${version}";
makeFlags = [ "INSTALLDIR=$(out)/$(installDir)" ];
preInstall = ''
mkdir -p $out/$installDir
'';
postInstall = ''
mkdir -p $out/bin
ln -s $out/$installDir/fsatrace $out/bin/fsatrace
'';
meta = with lib; {
homepage = "https://github.com/jacereda/fsatrace";
description = "Filesystem access tracer";
mainProgram = "fsatrace";
license = licenses.isc;
platforms = platforms.linux;
};
}

1077
pkgs/by-name/fs/fsautocomplete/deps.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,55 @@
{
lib,
buildDotnetModule,
fetchFromGitHub,
dotnetCorePackages,
testers,
nix-update-script,
}:
buildDotnetModule (finalAttrs: {
pname = "fsautocomplete";
version = "0.79.2";
src = fetchFromGitHub {
owner = "fsharp";
repo = "FsAutoComplete";
tag = "v${finalAttrs.version}";
hash = "sha256-GJ2ld2RF7utrgHszgrG8RCWimPJ2Za+kZzQOOu/qUqA=";
};
nugetDeps = ./deps.json;
postPatch = ''
rm global.json
substituteInPlace src/FsAutoComplete/FsAutoComplete.fsproj \
--replace-fail TargetFrameworks TargetFramework \
'';
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.sdk_8_0;
projectFile = "src/FsAutoComplete/FsAutoComplete.fsproj";
executables = [ "fsautocomplete" ];
useDotnetFromEnv = true;
passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = nix-update-script { };
};
meta = {
description = "Backend service for rich editing or intellisense features for editors";
mainProgram = "fsautocomplete";
homepage = "https://github.com/fsharp/FsAutoComplete";
changelog = "https://github.com/fsharp/FsAutoComplete/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
gbtb
mdarocha
];
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "fscan";
version = "2.0.1";
src = fetchFromGitHub {
owner = "shadow1ng";
repo = "fscan";
rev = version;
hash = "sha256-OFlwL7PXKOPKIW2YCirCGCXRCGIWYMmYHMmSU2he/tw=";
};
vendorHash = "sha256-+m87ReIUOqaTwuh/t0ow4dODG9/G21Gzw6+p/N9QOzU=";
meta = with lib; {
description = "Intranet comprehensive scanning tool";
homepage = "https://github.com/shadow1ng/fscan";
license = licenses.mit;
maintainers = with maintainers; [ Misaka13514 ];
mainProgram = "fscan";
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
buildGoModule,
fetchFromGitHub,
gnum4,
pam,
fscrypt-experimental,
}:
# Don't use this for anything important yet!
buildGoModule rec {
pname = "fscrypt";
version = "0.3.5";
src = fetchFromGitHub {
owner = "google";
repo = "fscrypt";
rev = "v${version}";
hash = "sha256-US1jw0XK1BcP037XPhttzBloDU62m4BVSIbsGs9LaJU=";
};
postPatch = ''
substituteInPlace Makefile \
--replace 'TAG_VERSION := $(shell git describe --tags)' "" \
--replace "/usr/local" "$out"
'';
vendorHash = "sha256-FuVWV3Rimhd+Pm9wrKGLWQWtbP1hWvoWa22pQT+m2go=";
doCheck = false;
nativeBuildInputs = [ gnum4 ];
buildInputs = [ pam ];
buildPhase = ''
runHook preBuild
make
runHook postBuild
'';
installPhase = ''
runHook preInstall
make install
runHook postInstall
'';
meta = {
description = "High-level tool for the management of Linux filesystem encryption";
mainProgram = "fscrypt";
longDescription = ''
This tool manages metadata, key generation, key wrapping, PAM integration,
and provides a uniform interface for creating and modifying encrypted
directories.
'';
inherit (src.meta) homepage;
changelog = "https://github.com/google/fscrypt/releases/tag/v${version}";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
pandoc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fscryptctl";
version = "1.2.0";
src = fetchFromGitHub {
owner = "google";
repo = "fscryptctl";
rev = "v${finalAttrs.version}";
hash = "sha256-5suEdSpX8alDkSnSnyiIjUmZq98eK0ZPVAtDKhOs65c=";
};
nativeBuildInputs = [ pandoc ];
strictDeps = true;
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = {
description = "Small C tool for Linux filesystem encryption";
mainProgram = "fscryptctl";
longDescription = ''
fscryptctl is a low-level tool written in C that handles raw keys and
manages policies for Linux filesystem encryption, specifically the
"fscrypt" kernel interface which is supported by the ext4, f2fs, and
UBIFS filesystems.
fscryptctl is mainly intended for embedded systems which can't use the
full-featured fscrypt tool, or for testing or experimenting with the
kernel interface to Linux filesystem encryption. fscryptctl does not
handle key generation, key stretching, key wrapping, or PAM integration.
Most users should use the fscrypt tool instead, which supports these
features and generally is much easier to use.
As fscryptctl is intended for advanced users, you should read the kernel
documentation for filesystem encryption before using fscryptctl.
'';
inherit (finalAttrs.src.meta) homepage;
changelog = "https://github.com/google/fscryptctl/blob/master/NEWS.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = [ ];
};
})

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
gtk3,
pcre2,
glib,
desktop-file-utils,
meson,
ninja,
pkg-config,
wrapGAppsHook3,
gettext,
icu,
}:
stdenv.mkDerivation rec {
pname = "fsearch";
version = "0.2.3";
src = fetchFromGitHub {
owner = "cboxdoerfer";
repo = "fsearch";
rev = version;
hash = "sha256-VBcoDxh4ip2zLBcXVHDe9s1lVRQF4bZJKsGUt6sPcos=";
};
nativeBuildInputs = [
desktop-file-utils
meson
ninja
pkg-config
wrapGAppsHook3
gettext
];
buildInputs = [
glib
gtk3
pcre2
icu
];
preFixup = ''
substituteInPlace $out/share/applications/io.github.cboxdoerfer.FSearch.desktop \
--replace "Exec=fsearch" "Exec=$out/bin/fsearch"
'';
meta = with lib; {
description = "Fast file search utility for Unix-like systems based on GTK+3";
homepage = "https://github.com/cboxdoerfer/fsearch.git";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ artturin ];
platforms = platforms.unix;
mainProgram = "fsearch";
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/fsearch.x86_64-darwin
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
installShellFiles,
libiconv,
}:
rustPlatform.buildRustPackage rec {
pname = "fselect";
version = "0.9.0";
src = fetchFromGitHub {
owner = "jhspetersson";
repo = "fselect";
rev = version;
sha256 = "sha256-uR0AElAjzvxymA9K/JySfYpPK59G2SaLTfZpdFtTg/g=";
};
cargoHash = "sha256-j/c2+I/KIYgNxYiHE2oWIq5frNPFtXE5wELWsog8dsc=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
postInstall = ''
installManPage docs/fselect.1
'';
meta = with lib; {
description = "Find files with SQL-like queries";
homepage = "https://github.com/jhspetersson/fselect";
license = with licenses; [
asl20
mit
];
maintainers = with maintainers; [ Br1ght0ne ];
mainProgram = "fselect";
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchurl,
gtk2,
glib,
pkg-config,
libGLU,
libGL,
wxGTK32,
libX11,
xorgproto,
runtimeShell,
}:
stdenv.mkDerivation rec {
pname = "fsg";
version = "4.4";
src = fetchurl {
name = "fsg-src-${version}.tar.gz";
url = "https://github.com/ctrlcctrlv/wxsand/blob/master/fsg-src-${version}-ORIGINAL.tar.gz?raw=true";
sha256 = "1756y01rkvd3f1pkj88jqh83fqcfl2fy0c48mcq53pjzln9ycv8c";
};
patches = [ ./wxgtk-3.2.patch ];
# use correct wx-config for cross-compiling
postPatch = ''
substituteInPlace makefile \
--replace-fail 'wx-config' "${lib.getExe' wxGTK32 "wx-config"}"
'';
hardeningDisable = [ "format" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
glib
libGLU
libGL
wxGTK32
libX11
xorgproto
];
preBuild = ''
sed -e '
s@currentProbIndex != 100@0@;
' -i MainFrame.cpp
sed -re '/ctrans_prob/s/energy\[center][+]energy\[other]/(int)(fmin(energy[center]+energy[other],99))/g' -i Canvas.cpp
'';
makeFlags = [
"CPP=${stdenv.cc.targetPrefix}c++"
];
installPhase = ''
mkdir -p $out/bin $out/libexec
cp sand $out/libexec
echo -e '#!${runtimeShell}\nLC_ALL=C '$out'/libexec/sand "$@"' >$out/bin/fsg
chmod a+x $out/bin/fsg
'';
meta = {
description = "Cellular automata engine tuned towards the likes of Falling Sand";
mainProgram = "fsg";
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,68 @@
diff --git a/Canvas.cpp b/Canvas.cpp
index 8c00727..5ee7756 100644
--- a/Canvas.cpp
+++ b/Canvas.cpp
@@ -889,7 +889,6 @@ void Canvas::Refresh(){
if (doDraw){
wxClientDC dc(this);
- dc.BeginDrawing();
wxMemoryDC memdc;
wxImage image(g_width, g_height, bitmapdata, true);
@@ -899,7 +898,6 @@ void Canvas::Refresh(){
dc.Blit(0,0,g_width, g_height, &memdc, 0, 0);
if (!drawAll){
- dc.EndDrawing();
return;
}
else{
@@ -912,7 +910,6 @@ void Canvas::Refresh(){
}
- dc.EndDrawing();
}
}
diff --git a/MainFrame.cpp b/MainFrame.cpp
index c45107b..d93f9e1 100644
--- a/MainFrame.cpp
+++ b/MainFrame.cpp
@@ -178,7 +178,7 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si
RHSizer->Add(RH4, 0, wxEXPAND | wxALL, 5);
}
- sizer->Add(g_canvas, 0, wxADJUST_MINSIZE | wxALL, 10);
+ sizer->Add(g_canvas, 0, wxALL, 10);
sizer->Add(RHSizer, 1, wxEXPAND);
}
this->SetSizer(sizer);
@@ -1165,7 +1165,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
}
else if(event.GetId() == 1051){
//Load
- wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxOPEN);
+ wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxFD_OPEN);
if (dialog.ShowModal() == wxID_OK){
sandboxFilename = dialog.GetPath();
@@ -1174,7 +1174,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
}
else if(event.GetId() == 1052){
//Save
- wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxSAVE);
+ wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxFD_SAVE);
if (dialog.ShowModal() == wxID_OK){
wxString filename = dialog.GetPath();
@@ -1216,7 +1216,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
else if(event.GetId() == 1055){
//Load physics
- wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxOPEN);
+ wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxFD_OPEN);
if (dialog.ShowModal() == wxID_OK){
physicsFilename = dialog.GetPath();
loadPhysics(physicsFilename);

View File

@@ -0,0 +1,71 @@
# Temporarily avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
{
lib,
stdenv,
fetchFromGitHub,
mono,
pkg-config,
dotnetbuildhelpers,
autoconf,
automake,
which,
}:
stdenv.mkDerivation rec {
pname = "fsharp";
version = "4.0.1.1";
src = fetchFromGitHub {
owner = "fsharp";
repo = "fsharp";
rev = version;
sha256 = "sha256-dgTEM2aL8lVjVMuW0+HLc+TUA39IiuBv/RfHYNURh5s=";
};
nativeBuildInputs = [
pkg-config
autoconf
automake
];
buildInputs = [
mono
dotnetbuildhelpers
which
];
configurePhase = ''
sed -i '988d' src/FSharpSource.targets
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
./autogen.sh --prefix $out
'';
# Make sure the executables use the right mono binary,
# and set up some symlinks for backwards compatibility.
postInstall = ''
substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono "
substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono "
substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono "
ln -s $out/bin/fsharpc $out/bin/fsc
ln -s $out/bin/fsharpi $out/bin/fsi
for dll in "$out/lib/mono/4.5"/FSharp*.dll
do
create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
done
'';
# To fix this error when running:
# The file "/nix/store/path/whatever.exe" is an not a valid CIL image
dontStrip = true;
meta = {
description = "Functional CLI language";
homepage = "https://fsharp.org/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
thoughtpolice
raskin
];
platforms = with lib.platforms; unix;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "fsmark";
version = "3.3";
src = fetchurl {
url = "mirror://sourceforge/fsmark/${version}/fs_mark-${version}.tar.gz";
sha256 = "15f8clcz49qsfijdmcz165ysp8v4ybsm57d3dxhhlnq1bp1i9w33";
};
patchPhase = ''
sed -i Makefile -e 's/-static //'
'';
installPhase = ''
mkdir -p $out/bin
cp fs_mark $out/bin/
'';
meta = with lib; {
description = "Synchronous write workload file system benchmark";
homepage = "https://sourceforge.net/projects/fsmark/";
license = licenses.gpl2Plus;
maintainers = [ maintainers.dezgeg ];
platforms = platforms.linux;
mainProgram = "fs_mark";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "fsmon";
version = "1.8.8";
src = fetchFromGitHub {
owner = "nowsecure";
repo = "fsmon";
tag = version;
hash = "sha256-WxOPNc939qwrdDNC3v3pmcltd8MnM8Gsu8t6VR/ZWYY=";
};
installPhase = ''
make install PREFIX=$out
'';
meta = {
description = "FileSystem Monitor utility";
homepage = "https://github.com/nowsecure/fsmon";
changelog = "https://github.com/nowsecure/fsmon/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dezgeg ];
platforms = lib.platforms.linux;
mainProgram = "fsmon";
};
}

View File

@@ -0,0 +1,288 @@
diff --git a/fsnotifier.h b/fsnotifier.h
index e7b2a42456bc..9dfb61d8d5d0 100644
--- a/fsnotifier.h
+++ b/fsnotifier.h
@@ -61,7 +61,7 @@ bool init_inotify(void);
void set_inotify_callback(void (*callback)(const char *, uint32_t));
int get_inotify_fd(void);
int watch(const char* root, array* mounts);
-void unwatch(int id);
+void unwatch(int id, char* path, unsigned int path_len);
bool process_inotify_input(void);
void close_inotify(void);
diff --git a/inotify.c b/inotify.c
index a42846379476..0a33eded78bf 100644
--- a/inotify.c
+++ b/inotify.c
@@ -22,6 +22,8 @@ typedef struct watch_node_str {
struct watch_node_str* parent;
array* kids;
unsigned int path_len;
+ struct watch_node_str* prev;
+ struct watch_node_str* next;
char path[];
} watch_node;
@@ -102,7 +104,7 @@ int get_inotify_fd(void) {
#define EVENT_MASK (IN_MODIFY | IN_ATTRIB | IN_CREATE | IN_DELETE | IN_MOVE | IN_DELETE_SELF | IN_MOVE_SELF)
-static int add_watch(unsigned int path_len, watch_node* parent) {
+static int add_watch(unsigned int path_len, watch_node* parent, watch_node** out) {
int wd = inotify_add_watch(inotify_fd, path_buf, EVENT_MASK);
if (wd < 0) {
if (errno == EACCES || errno == ENOENT) {
@@ -123,36 +125,39 @@ static int add_watch(unsigned int path_len, watch_node* parent) {
userlog(LOG_INFO, "watching %s: %d", path_buf, wd);
}
- watch_node* node = table_get(watches, wd);
- if (node != NULL) {
- if (node->wd != wd) {
- userlog(LOG_ERR, "table error: corruption at %d:%s / %d:%s / %d", wd, path_buf, node->wd, node->path, watch_count);
- return ERR_ABORT;
- }
- else if (strcmp(node->path, path_buf) != 0) {
- char buf1[PATH_MAX], buf2[PATH_MAX];
- const char* normalized1 = realpath(node->path, buf1);
- const char* normalized2 = realpath(path_buf, buf2);
- if (normalized1 == NULL || normalized2 == NULL || strcmp(normalized1, normalized2) != 0) {
- userlog(LOG_ERR, "table error: collision at %d (new %s, existing %s)", wd, path_buf, node->path);
- return ERR_ABORT;
- }
- else {
- userlog(LOG_INFO, "intersection at %d: (new %s, existing %s, real %s)", wd, path_buf, node->path, normalized1);
- return ERR_IGNORE;
- }
- }
-
- return wd;
- }
-
- node = malloc(sizeof(watch_node) + path_len + 1);
+ watch_node* existing = table_get(watches, wd);
+ if (existing != NULL) {
+ for (;;) {
+ if (existing->wd != wd) {
+ userlog(LOG_ERR, "table error: corruption at %d:%s / %d:%s / %d", wd, path_buf, existing->wd, existing->path, watch_count);
+ return ERR_ABORT;
+ }
+ if (existing->path_len == path_len && strncmp(existing->path, path_buf, path_len) == 0) {
+ return wd;
+ }
+ char buf1[PATH_MAX], buf2[PATH_MAX];
+ const char* normalized1 = realpath(existing->path, buf1);
+ const char* normalized2 = realpath(path_buf, buf2);
+ if (normalized1 != NULL && normalized2 != NULL && strcmp(normalized1, normalized2) == 0) {
+ userlog(LOG_INFO, "intersection at %d: (new %s, existing %s, real %s)", wd, path_buf, existing->path, normalized1);
+ return ERR_IGNORE;
+ }
+ if (existing->next == NULL) {
+ break;
+ }
+ existing = existing->next;
+ }
+ }
+
+ watch_node* node = malloc(sizeof(watch_node) + path_len + 1);
CHECK_NULL(node, ERR_ABORT)
memcpy(node->path, path_buf, path_len + 1);
node->path_len = path_len;
node->wd = wd;
node->parent = parent;
node->kids = NULL;
+ node->prev = existing;
+ node->next = NULL;
if (parent != NULL) {
if (parent->kids == NULL) {
@@ -162,11 +167,15 @@ static int add_watch(unsigned int path_len, watch_node* parent) {
CHECK_NULL(array_push(parent->kids, node), ERR_ABORT)
}
- if (table_put(watches, wd, node) == NULL) {
+ if (existing != NULL) {
+ existing->next = node;
+ }
+ else if (table_put(watches, wd, node) == NULL) {
userlog(LOG_ERR, "table error: unable to put (%d:%s)", wd, path_buf);
return ERR_ABORT;
}
+ *out = node;
return wd;
}
@@ -177,22 +186,27 @@ static void watch_limit_reached(void) {
}
}
-static void rm_watch(int wd, bool update_parent) {
- watch_node* node = table_get(watches, wd);
- if (node == NULL) {
- return;
+static void rm_watch(watch_node* node, bool update_parent) {
+ if (node->prev != NULL) {
+ node->prev->next = node->next;
+ node->next->prev = node->prev;
}
-
- userlog(LOG_INFO, "unwatching %s: %d (%p)", node->path, node->wd, node);
-
- if (inotify_rm_watch(inotify_fd, node->wd) < 0) {
- userlog(LOG_INFO, "inotify_rm_watch(%d:%s): %s", node->wd, node->path, strerror(errno));
+ else if (node->next != NULL) {
+ table_put(watches, node->wd, node->next);
+ node->next->prev = NULL;
+ }
+ else {
+ userlog(LOG_INFO, "unwatching %s: %d (%p)", node->path, node->wd, node);
+ if (inotify_rm_watch(inotify_fd, node->wd) < 0) {
+ userlog(LOG_INFO, "inotify_rm_watch(%d:%s): %s", node->wd, node->path, strerror(errno));
+ }
+ table_put(watches, node->wd, NULL);
}
for (int i = 0; i < array_size(node->kids); i++) {
watch_node* kid = array_get(node->kids, i);
if (kid != NULL) {
- rm_watch(kid->wd, false);
+ rm_watch(kid, false);
}
}
@@ -207,7 +221,6 @@ static void rm_watch(int wd, bool update_parent) {
array_delete(node->kids);
free(node);
- table_put(watches, wd, NULL);
}
@@ -234,7 +247,9 @@ static int walk_tree(unsigned int path_len, watch_node* parent, bool recursive,
}
}
- int id = add_watch(path_len, parent);
+
+ watch_node* node;
+ int id = add_watch(path_len, parent, &node);
if (dir == NULL) {
return id;
@@ -271,7 +286,7 @@ static int walk_tree(unsigned int path_len, watch_node* parent, bool recursive,
int subdir_id = walk_tree(path_len + 1 + name_len, table_get(watches, id), recursive, mounts);
if (subdir_id < 0 && subdir_id != ERR_IGNORE) {
- rm_watch(id, true);
+ rm_watch(node, true);
id = subdir_id;
break;
}
@@ -323,47 +338,49 @@ int watch(const char* root, array* mounts) {
}
-void unwatch(int id) {
- rm_watch(id, true);
+void unwatch(int wd, char* path, unsigned int path_len) {
+ for (watch_node* node = table_get(watches, wd); node != NULL; node = node->next) {
+ if (node->path_len == path_len && strncmp(node->path, path, path_len) == 0) {
+ rm_watch(node, true);
+ return;
+ }
+ }
}
static bool process_inotify_event(struct inotify_event* event) {
- watch_node* node = table_get(watches, event->wd);
- if (node == NULL) {
- return true;
- }
-
- bool is_dir = (event->mask & IN_ISDIR) == IN_ISDIR;
- userlog(LOG_INFO, "inotify: wd=%d mask=%d dir=%d name=%s", event->wd, event->mask & (~IN_ISDIR), is_dir, node->path);
-
- unsigned int path_len = node->path_len;
- memcpy(path_buf, node->path, path_len + 1);
- if (event->len > 0) {
- path_buf[path_len] = '/';
- unsigned int name_len = strlen(event->name);
- memcpy(path_buf + path_len + 1, event->name, name_len + 1);
- path_len += name_len + 1;
- }
+ for (watch_node* node = table_get(watches, event->wd); node != NULL; node = node->next) {
+ bool is_dir = (event->mask & IN_ISDIR) == IN_ISDIR;
+ userlog(LOG_INFO, "inotify: wd=%d mask=%d dir=%d name=%s", event->wd, event->mask & (~IN_ISDIR), is_dir, node->path);
+
+ unsigned int path_len = node->path_len;
+ memcpy(path_buf, node->path, path_len + 1);
+ if (event->len > 0) {
+ path_buf[path_len] = '/';
+ unsigned int name_len = strlen(event->name);
+ memcpy(path_buf + path_len + 1, event->name, name_len + 1);
+ path_len += name_len + 1;
+ }
- if (callback != NULL) {
- (*callback)(path_buf, event->mask);
- }
+ if (callback != NULL) {
+ (*callback)(path_buf, event->mask);
+ }
- if (is_dir && event->mask & (IN_CREATE | IN_MOVED_TO)) {
- int result = walk_tree(path_len, node, true, NULL);
- if (result < 0 && result != ERR_IGNORE && result != ERR_CONTINUE) {
- return false;
+ if (is_dir && event->mask & (IN_CREATE | IN_MOVED_TO)) {
+ int result = walk_tree(path_len, node, true, NULL);
+ if (result < 0 && result != ERR_IGNORE && result != ERR_CONTINUE) {
+ return false;
+ }
}
- }
- if (is_dir && event->mask & (IN_DELETE | IN_MOVED_FROM)) {
- for (int i = 0; i < array_size(node->kids); i++) {
- watch_node* kid = array_get(node->kids, i);
- if (kid != NULL && strncmp(path_buf, kid->path, kid->path_len) == 0) {
- rm_watch(kid->wd, false);
- array_put(node->kids, i, NULL);
- break;
+ if (is_dir && event->mask & (IN_DELETE | IN_MOVED_FROM)) {
+ for (int i = 0; i < array_size(node->kids); i++) {
+ watch_node* kid = array_get(node->kids, i);
+ if (kid != NULL && strncmp(path_buf, kid->path, kid->path_len) == 0) {
+ rm_watch(kid, false);
+ array_put(node->kids, i, NULL);
+ break;
+ }
}
}
}
diff --git a/main.c b/main.c
index b6b2e6fdb5b0..32cc8efe7856 100644
--- a/main.c
+++ b/main.c
@@ -246,7 +246,7 @@ static void unregister_roots(void) {
watch_root* root;
while ((root = array_pop(roots)) != NULL) {
userlog(LOG_INFO, "unregistering root: %s", root->path);
- unwatch(root->id);
+ unwatch(root->id, root->path, strlen(root->path));
free(root->path);
free(root);
}
@@ -422,7 +422,7 @@ static void check_root_removal(const char* path) {
for (int i = 0; i < array_size(roots); i++) {
watch_root* root = array_get(roots, i);
if (root->id >= 0 && strcmp(path, UNFLATTEN(root->path)) == 0) {
- unwatch(root->id);
+ unwatch(root->id, root->path, strlen(root->path));
root->id = -1;
userlog(LOG_INFO, "root deleted: %s\n", root->path);
report_event("DELETE", path);

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
version = "2024.2.0";
pname = "fsnotifier";
src = fetchFromGitHub {
owner = "JetBrains";
repo = "intellij-community";
rev = "0f6d9ccb67b8fcad0d802cd76209d503c4ed66a6";
hash = "sha256-3TAiVvKi50JQRrVG6J7LUJKTiuOTDyKt4DhoA1QmbrM=";
sparseCheckout = [ "native/fsNotifier/linux" ];
};
# fix for hard-links in nix-store, https://github.com/JetBrains/intellij-community/pull/2171
patches = [ ./fsnotifier.patch ];
sourceRoot = "${src.name}/native/fsNotifier/linux";
buildPhase = ''
mkdir -p $out/bin
$CC -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${version}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
cp fsnotifier $out/bin/fsnotifier
'';
meta = {
homepage = "https://github.com/JetBrains/intellij-community/tree/master/native/fsNotifier/linux";
description = "IntelliJ Platform companion program for watching and reporting file and directory structure modification";
license = lib.licenses.asl20;
mainProgram = "fsnotifier";
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,28 @@
{
appimageTools,
lib,
fetchurl,
}:
let
pname = "fspy";
version = "1.0.3";
src = fetchurl {
url = "https://github.com/stuffmatic/fSpy/releases/download/v${version}/${pname}-${version}-x86_64.AppImage";
sha256 = "sha256-L+qsSExuEkzZkjnV/J6rrZ3BXqWQd+IfsN6a3kvQF3A=";
};
in
appimageTools.wrapType2 {
inherit pname version src;
meta = with lib; {
description = "Cross platform app for quick and easy still image camera matching";
license = licenses.gpl3;
homepage = "https://fspy.io/";
knownVulnerabilities = [ "Vendors Electron 2.0 (end-of-life)" ];
maintainers = with maintainers; [ polygon ];
platforms = platforms.linux;
mainProgram = "fspy";
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "fsql";
version = "0.5.2";
src = fetchFromGitHub {
owner = "kshvmdn";
repo = "fsql";
rev = "v${version}";
sha256 = "sha256-U6TPszqsZvoz+9GIB0wNYMRJqIDLOp/BZO3/k8FC0Gs=";
};
vendorHash = "sha256-+laTnx6Xkrv3QQel5opqYQSuFmo54UMI2A653xbBWzQ=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Search through your filesystem with SQL-esque queries";
homepage = "https://github.com/kshvmdn/fsql";
license = licenses.mit;
maintainers = with maintainers; [ pSub ];
mainProgram = "fsql";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
rustPlatform,
testers,
fsrx,
}:
rustPlatform.buildRustPackage rec {
pname = "fsrx";
version = "1.0.2";
src = fetchFromGitHub {
owner = "thatvegandev";
repo = "fsrx";
rev = "v${version}";
sha256 = "sha256-hzfpjunP20WCt3erYu7AO7A3nz+UMKdFzWUA5jASbVA=";
};
cargoHash = "sha256-hOE05t3gjul7uOt14vr5hAmGHTPgxJk7EOKJhZ4XgCo=";
passthru = {
tests.version = testers.testVersion {
package = fsrx;
};
};
meta = with lib; {
description = "Flow state reader in the terminal";
homepage = "https://github.com/thatvegandev/fsrx";
license = licenses.mit;
maintainers = with maintainers; [ MoritzBoehme ];
mainProgram = "fsrx";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
rustPlatform,
fetchCrate,
stdenv,
libiconv,
}:
rustPlatform.buildRustPackage rec {
pname = "fst";
version = "0.4.3";
src = fetchCrate {
inherit version;
crateName = "fst-bin";
hash = "sha256-x2rvLMOhatMWU2u5GAdpYy2uuwZLi3apoE6aaTF+M1g=";
};
cargoHash = "sha256-zO2RYJpTyFFEQ+xZH4HU0CPaeiy6G3uq/qOwPawYSkk=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
doInstallCheck = true;
installCheckPhase = ''
csv="$(mktemp)"
fst="$(mktemp)"
printf "abc,1\nabcd,1" > "$csv"
$out/bin/fst map "$csv" "$fst" --force
$out/bin/fst fuzzy "$fst" 'abc'
$out/bin/fst --help > /dev/null
'';
meta = with lib; {
description = "Represent large sets and maps compactly with finite state transducers";
mainProgram = "fst";
homepage = "https://github.com/BurntSushi/fst";
license = with licenses; [
unlicense # or
mit
];
maintainers = with maintainers; [ rmcgibbo ];
};
}

View File

@@ -0,0 +1,125 @@
{
callPackage,
fetchFromGitHub,
installShellFiles,
lib,
makeWrapper,
nix-update-script,
ocaml-ng,
removeReferencesTo,
util-linux,
which,
}:
let
# The version of ocaml fstar uses.
ocamlPackages = ocaml-ng.ocamlPackages_5_3;
fstarZ3 = callPackage ./z3 { };
in
ocamlPackages.buildDunePackage rec {
pname = "fstar";
version = "2025.08.07";
src = fetchFromGitHub {
owner = "FStarLang";
repo = "FStar";
rev = "v${version}";
hash = "sha256-IfwMLMbyC1+iPIG48zm6bzhKCHKPOpVaHdlLhU5g3co=";
};
nativeBuildInputs = [
ocamlPackages.menhir
which
util-linux
installShellFiles
makeWrapper
removeReferencesTo
];
prePatch = ''
patchShebangs .scripts/*.sh
patchShebangs ulib/ml/app/ints/mk_int_file.sh
'';
buildInputs = with ocamlPackages; [
memtrace
];
propagatedBuildInputs = with ocamlPackages; [
batteries
menhirLib
pprint
ppx_deriving
ppx_deriving_yojson
ppxlib
process
sedlex
stdint
yojson
zarith
mtime
];
preConfigure = ''
mkdir -p cache
export DUNE_CACHE_ROOT="$(pwd)/cache"
export PATH="${lib.makeBinPath [ fstarZ3 ]}''${PATH:+:}$PATH"
export PREFIX="$out"
'';
buildPhase = ''
runHook preBuild
make -j$NIX_BUILD_CORES
runHook postBuild
'';
installPhase = ''
runHook preInstall
make install
# Ensure ocamlfind can locate fstar OCaml libraries
mkdir -p $OCAMLFIND_DESTDIR
ln -s -t $OCAMLFIND_DESTDIR/ $out/lib/fstar
remove-references-to -t '${ocamlPackages.ocaml}' $out/bin/fstar.exe
for binary in $out/bin/*; do
wrapProgram "$binary" --prefix PATH : "${lib.makeBinPath [ fstarZ3 ]}"
done
src="$(pwd)"
cd $out
installShellCompletion --bash $src/.completion/bash/fstar.exe.bash
installShellCompletion --fish $src/.completion/fish/fstar.exe.fish
installShellCompletion --zsh --name _fstar.exe $src/.completion/zsh/__fstar.exe
cd $src
runHook postInstall
'';
enableParallelBuilding = true;
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"v(\d{4}\.\d{2}\.\d{2})$"
];
};
z3 = fstarZ3;
};
meta = {
description = "ML-like functional programming language aimed at program verification";
homepage = "https://www.fstar-lang.org";
changelog = "https://github.com/FStarLang/FStar/raw/v${version}/CHANGES.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
numinit
];
mainProgram = "fstar.exe";
platforms = with lib.platforms; darwin ++ linux;
};
}

View File

@@ -0,0 +1,26 @@
diff --git a/src/util/lp/lp_core_solver_base.h b/src/util/lp/lp_core_solver_base.h
index 4c17df2..4c3c311 100644
--- a/src/util/lp/lp_core_solver_base.h
+++ b/src/util/lp/lp_core_solver_base.h
@@ -600,8 +600,6 @@ public:
out << " \n";
}
- bool column_is_free(unsigned j) const { return this->m_column_type[j] == free; }
-
bool column_has_upper_bound(unsigned j) const {
switch(m_column_types[j]) {
case column_type::free_column:
diff --git a/src/util/lp/static_matrix_def.h b/src/util/lp/static_matrix_def.h
index 7949573..2f1cb42 100644
--- a/src/util/lp/static_matrix_def.h
+++ b/src/util/lp/static_matrix_def.h
@@ -86,7 +86,7 @@ static_matrix<T, X>::static_matrix(static_matrix const &A, unsigned * /* basis *
init_row_columns(m, m);
while (m--) {
for (auto & col : A.m_columns[m]){
- set(col.var(), m, A.get_value_of_column_cell(col));
+ set(col.var(), m, A.get_column_cell(col));
}
}
}

View File

@@ -0,0 +1,108 @@
{
fetchFromGitHub,
fetchpatch,
lib,
replaceVars,
stdenvNoCC,
z3,
}:
let
z3' = z3.override { useCmakeBuild = false; };
# fstar has a pretty hard dependency on certain z3 patch versions.
# https://github.com/FStarLang/FStar/issues/3689#issuecomment-2625073641
# We need to package all the Z3 versions it prefers here.
fstarNewZ3Version = "4.13.3";
fstarNewZ3 =
if z3'.version == fstarNewZ3Version then
z3'
else
z3'.overrideAttrs (final: rec {
version = fstarNewZ3Version;
src = fetchFromGitHub {
owner = "Z3Prover";
repo = "z3";
rev = "z3-${version}";
hash = "sha256-odwalnF00SI+sJGHdIIv4KapFcfVVKiQ22HFhXYtSvA=";
};
});
fstarOldZ3Version = "4.8.5";
fstarOldZ3 =
if z3'.version == fstarOldZ3Version then
z3'
else
z3'.overrideAttrs (prev: rec {
version = fstarOldZ3Version;
src = fetchFromGitHub {
owner = "Z3Prover";
repo = "z3";
rev = "Z3-${version}"; # caps matter
hash = "sha256-ytG5O9HczbIVJAiIGZfUXC/MuYH7d7yLApaeTRlKXoc=";
};
patches =
let
static-matrix-patch = fetchpatch {
# clang / gcc fixes. fixes typos in some member names
name = "gcc-15-fixes.patch";
url = "https://github.com/Z3Prover/z3/commit/2ce89e5f491fa817d02d8fdce8c62798beab258b.patch";
includes = [ "src/@dir@/lp/static_matrix.h" ];
stripLen = 3;
extraPrefix = "src/@dir@/";
hash = "sha256-+H1/VJPyI0yq4M/61ay8SRCa6OaoJ/5i+I3zVTAPUVo=";
};
# replace @dir@ in the path of the given list of patches
fixupPatches = dir: map (patch: replaceVars patch { dir = dir; });
in
prev.patches or [ ]
++ fixupPatches "util" [
./lower-bound-typo.diff
static-matrix-patch
./tail-matrix.diff
]
++ [
./4-8-5-typos.diff
];
postPatch =
let
python = lib.findFirst (pkg: lib.hasPrefix "python" pkg.pname) null prev.nativeBuildInputs;
in
assert python != null;
prev.postPatch or ""
+
lib.optionalString
((lib.versionAtLeast python.version "3.12") && (lib.versionOlder version "4.8.14"))
''
# See https://github.com/Z3Prover/z3/pull/5729. This is a specialization of this patch for 4.8.5.
for file in scripts/mk_util.py src/api/python/CMakeLists.txt; do
substituteInPlace "$file" \
--replace-fail "distutils.sysconfig.get_python_lib()" "sysconfig.get_path('purelib')" \
--replace-fail "distutils.sysconfig" "sysconfig"
done
'';
});
in
stdenvNoCC.mkDerivation {
name = "fstar-z3";
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
ln -s ${lib.getExe fstarNewZ3} $out/bin/z3-${lib.escapeShellArg fstarNewZ3.version}
ln -s ${lib.getExe fstarOldZ3} $out/bin/z3-${lib.escapeShellArg fstarOldZ3.version}
'';
passthru = rec {
new = fstarNewZ3;
"z3_${lib.replaceStrings [ "." ] [ "_" ] fstarNewZ3.version}" = new;
old = fstarOldZ3;
"z3_${lib.replaceStrings [ "." ] [ "_" ] fstarOldZ3.version}" = old;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/@dir@/lp/column_info.h b/src/@dir@/lp/column_info.h
index 1dc0c60..9cbeea6 100644
--- a/src/@dir@/lp/column_info.h
+++ b/src/@dir@/lp/column_info.h
@@ -47,7 +47,7 @@ public:
m_lower_bound_is_strict == c.m_lower_bound_is_strict &&
m_upper_bound_is_set == c.m_upper_bound_is_set&&
m_upper_bound_is_strict == c.m_upper_bound_is_strict&&
- (!m_lower_bound_is_set || m_lower_bound == c.m_low_bound) &&
+ (!m_lower_bound_is_set || m_lower_bound == c.m_lower_bound) &&
(!m_upper_bound_is_set || m_upper_bound == c.m_upper_bound) &&
m_cost == c.m_cost &&
m_is_fixed == c.m_is_fixed &&

View File

@@ -0,0 +1,12 @@
diff --git a/src/@dir@/lp/tail_matrix.h b/src/@dir@/lp/tail_matrix.h
index 2047e8c..c84340e 100644
--- a/src/@dir@/lp/tail_matrix.h
+++ b/src/@dir@/lp/tail_matrix.h
@@ -43,7 +43,6 @@ public:
const tail_matrix & m_A;
unsigned m_row;
ref_row(const tail_matrix& m, unsigned row): m_A(m), m_row(row) {}
- T operator[](unsigned j) const { return m_A.get_elem(m_row, j);}
};
ref_row operator[](unsigned i) const { return ref_row(*this, i);}
};

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libsForQt5,
}:
stdenv.mkDerivation rec {
pname = "fstl";
version = "0.11.1";
nativeBuildInputs = [
cmake
libsForQt5.wrapQtAppsHook
];
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
mv fstl.app $out/Applications
runHook postInstall
'';
src = fetchFromGitHub {
owner = "fstl-app";
repo = "fstl";
rev = "v" + version;
hash = "sha256-puDYXANiyTluSlmnT+gnNPA5eCcw0Ny6md6Ock6pqLc=";
};
meta = with lib; {
description = "Fastest STL file viewer";
mainProgram = "fstl";
homepage = "https://github.com/fstl-app/fstl";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ tweber ];
};
}

View File

@@ -0,0 +1,24 @@
diff '--color=auto' -ur fstrcmp-0.7-D001-old/configure.ac fstrcmp-0.7.D001/configure.ac
--- fstrcmp-0.7-D001-old/configure.ac 2014-03-04 19:13:45.000000000 -0500
+++ fstrcmp-0.7.D001/configure.ac 2020-04-02 13:57:52.805154634 -0400
@@ -32,6 +32,8 @@
AC_OBJEXT
AC_EXEEXT
+LT_INIT
+
dnl @synopsis AC_ADD_CFLAGS
dnl
dnl Add the given option to CFLAGS, if it doesn't break the compiler
diff '--color=auto' -ur fstrcmp-0.7-D001-old/Makefile.in fstrcmp-0.7.D001/Makefile.in
--- fstrcmp-0.7-D001-old/Makefile.in 2014-03-04 19:13:45.000000000 -0500
+++ fstrcmp-0.7.D001/Makefile.in 2020-04-02 13:57:12.355269595 -0400
@@ -37,6 +37,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+top_builddir = $(srcdir)
+
#
# the name of the install program to use
#

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchzip,
libtool,
ghostscript,
groff,
autoreconfHook,
}:
stdenv.mkDerivation rec {
pname = "fstrcmp";
version = "0.7";
src = fetchzip {
url = "https://sourceforge.net/projects/fstrcmp/files/fstrcmp/${version}/fstrcmp-${version}.D001.tar.gz";
sha256 = "0yg3y3k0wz50gmhgigfi2dx725w1gc8snb95ih7vpcnj6kabgz9a";
};
patches = [ ./cross.patch ];
outputs = [
"out"
"dev"
"doc"
"man"
"devman"
];
nativeBuildInputs = [
libtool
ghostscript
groff
autoreconfHook
];
enableParallelBuilding = true;
meta = with lib; {
description = "Make fuzzy comparisons of strings and byte arrays";
mainProgram = "fstrcmp";
longDescription = ''
The fstrcmp project provides a library that is used to make fuzzy
comparisons of strings and byte arrays, including multi-byte character
strings.
'';
homepage = "https://fstrcmp.sourceforge.net/";
downloadPage = "https://sourceforge.net/projects/fstrcmp/";
license = licenses.gpl3;
maintainers = [ maintainers.sephalon ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
libevent,
openssl,
}:
stdenv.mkDerivation rec {
pname = "fstrm";
version = "0.6.1";
src = fetchFromGitHub {
owner = "farsightsec";
repo = "fstrm";
rev = "v${version}";
sha256 = "sha256-/WFP2g3Vuf/qaY8pprY8XFAlpEE+0SJUlFNWfa+7ZlE=";
};
outputs = [
"bin"
"out"
"dev"
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
libevent
openssl
];
preBuild = ''
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -L${openssl}/lib"
'';
doCheck = true;
meta = with lib; {
description = "Frame Streams implementation in C";
homepage = "https://github.com/farsightsec/fstrm";
license = licenses.asl20;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
fetchurl,
fsuae,
gettext,
python3Packages,
stdenv,
libsForQt5,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fs-uae-launcher";
version = "3.1.70";
src = fetchurl {
url = "https://fs-uae.net/files/FS-UAE-Launcher/Stable/${finalAttrs.version}/fs-uae-launcher-${finalAttrs.version}.tar.xz";
hash = "sha256-yvJ8sa44V13SEUJ6C9SgS+N2ZFH5+20TTL2ICY9A36c=";
};
nativeBuildInputs = [
gettext
python3Packages.python
libsForQt5.wrapQtAppsHook
];
buildInputs = with python3Packages; [
pyqt5
requests
setuptools
];
strictDeps = true;
makeFlags = [ "prefix=$(out)" ];
dontWrapQtApps = true;
postPatch = ''
substituteInPlace setup.py \
--replace-fail "distutils.core" "setuptools"
'';
preFixup = ''
wrapQtApp "$out/bin/fs-uae-launcher" \
--set PYTHONPATH "$PYTHONPATH"
# fs-uae-launcher search side by side for executables and shared files
# see $src/fsgs/plugins/pluginexecutablefinder.py#find_executable
ln -s ${fsuae}/bin/fs-uae $out/bin
ln -s ${fsuae}/bin/fs-uae-device-helper $out/bin
ln -s ${fsuae}/share/fs-uae $out/share/fs-uae
'';
meta = {
homepage = "https://fs-uae.net";
description = "Graphical front-end for the FS-UAE emulator";
license = lib.licenses.gpl2Plus;
mainProgram = "fs-uae-launcher";
maintainers = with lib.maintainers; [
sander
];
platforms = with lib.systems.inspect; patternLogicalAnd patterns.isx86 patterns.isLinux;
};
})

View File

@@ -0,0 +1,80 @@
{
lib,
SDL2,
autoreconfHook,
fetchFromGitHub,
freetype,
gettext,
glib,
gtk2,
libGL,
libGLU,
libmpeg2,
lua,
openal,
pkg-config,
strip-nondeterminism,
stdenv,
zip,
zlib,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fs-uae";
version = "3.2.35";
src = fetchFromGitHub {
owner = "FrodeSolheim";
repo = "fs-uae";
rev = "v${finalAttrs.version}";
hash = "sha256-e+Q+PC6Kpq3OBKsgoRvmu2p9dQfJeRCdFO1agXIGcU8=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
strip-nondeterminism
zip
];
buildInputs = [
SDL2
freetype
gettext
glib
gtk2
libGL
libGLU
libmpeg2
lua
openal
zlib
];
strictDeps = true;
# Make sure that the build timestamp is not included in the archive
postFixup = ''
strip-nondeterminism --type zip $out/share/fs-uae/fs-uae.dat
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://fs-uae.net";
description = "Accurate, customizable Amiga Emulator";
longDescription = ''
FS-UAE integrates the most accurate Amiga emulation code available from
WinUAE. FS-UAE emulates A500, A500+, A600, A1200, A1000, A3000 and A4000
models, but you can tweak the hardware configuration and create customized
Amigas.
'';
license = lib.licenses.gpl2Plus;
mainProgram = "fs-uae";
maintainers = with lib.maintainers; [
c4patino
];
platforms = with lib.systems.inspect; patternLogicalAnd patterns.isx86 patterns.isLinux;
};
})

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
cglm,
gtk3,
libepoxy,
libGLU,
}:
stdenv.mkDerivation rec {
pname = "fsv";
version = "3.0";
src = fetchFromGitHub {
owner = "jabl";
repo = "fsv";
rev = "${pname}-${version}";
hash = "sha256-fxsA3qcBPvK4H5P4juGTe6eg1lkygvzFpNW36B9lsE4=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
cglm
gtk3
libepoxy
libGLU
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp src/fsv $out/bin/fsv
runHook postInstall
'';
meta = with lib; {
description = "File system visualizer in cyberspace";
longDescription = ''
fsv (pronounced eff-ess-vee) is a file system visualizer in cyberspace.
It lays out files and directories in three dimensions, geometrically
representing the file system hierarchy to allow visual overview
and analysis. fsv can visualize a modest home directory, a workstation's
hard drive, or any arbitrarily large collection of files, limited only
by the host computer's memory and graphics hardware.
'';
homepage = "https://github.com/jabl/fsv";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ rnhmjoj ];
mainProgram = "fsv";
};
}

View File

@@ -0,0 +1,61 @@
{
stdenv,
lib,
fetchzip,
openssl,
enableShared ? !stdenv.hostPlatform.isStatic,
enableManpages ? false,
pandoc,
}:
stdenv.mkDerivation rec {
pname = "fsverity-utils";
version = "1.6";
outputs = [
"out"
"lib"
"dev"
]
++ lib.optional enableManpages "man";
src = fetchzip {
url = "https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/snapshot/fsverity-utils-v${version}.tar.gz";
sha256 = "sha256-FZN4MKNmymIXZ2Q0woA0SLzPf4SaUJkj4ssKPsY4xXc=";
};
patches = lib.optionals (!enableShared) [
./remove-dynamic-libs.patch
];
enableParallelBuilding = true;
strictDeps = true;
nativeBuildInputs = lib.optional enableManpages pandoc;
buildInputs = [ openssl ];
makeFlags = [
"DESTDIR=$(out)"
"PREFIX="
]
++ lib.optional enableShared "USE_SHARED_LIB=1";
doCheck = true;
installTargets = [ "install" ] ++ lib.optional enableManpages "install-man";
postInstall = ''
mkdir -p $lib
mv $out/lib $lib/lib
'';
meta = with lib; {
homepage = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#userspace-utility";
changelog = "https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/tree/NEWS.md";
description = "Set of userspace utilities for fs-verity";
mainProgram = "fsverity";
license = licenses.mit;
maintainers = with maintainers; [ jk ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,27 @@
diff --git a/Makefile b/Makefile
index 2304a21..697ccd4 100644
--- a/Makefile
+++ b/Makefile
@@ -149,13 +149,11 @@ libfsverity.so.$(SOVERSION):$(SHARED_LIB_OBJ)
$(QUIET_CCLD) $(CC) -o $@ -Wl,-soname=$@ -shared $+ \
$(CFLAGS) $(LDFLAGS) $(LDLIBS)
-DEFAULT_TARGETS += libfsverity.so.$(SOVERSION)
# Create the symlink libfsverity.so => libfsverity.so.$(SOVERSION)
libfsverity.so:libfsverity.so.$(SOVERSION)
$(QUIET_LN) ln -sf $+ $@
-DEFAULT_TARGETS += libfsverity.so
##############################################################################
@@ -263,8 +261,6 @@ install:all
install -d $(DESTDIR)$(LIBDIR)/pkgconfig $(DESTDIR)$(INCDIR) $(DESTDIR)$(BINDIR)
install -m755 $(FSVERITY) $(DESTDIR)$(BINDIR)
install -m644 libfsverity.a $(DESTDIR)$(LIBDIR)
- install -m755 libfsverity.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)
- ln -sf libfsverity.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libfsverity.so
install -m644 include/libfsverity.h $(DESTDIR)$(INCDIR)
sed -e "s|@PREFIX@|$(PREFIX)|" \
-e "s|@LIBDIR@|$(LIBDIR)|" \

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
# for xargs
gettext,
libtool,
makeWrapper,
texinfo,
}:
stdenv.mkDerivation rec {
pname = "fswatch";
version = "1.18.3";
src = fetchFromGitHub {
owner = "emcrisostomo";
repo = "fswatch";
rev = version;
sha256 = "sha256-C/NHDhhRTQppu8xRWe9fy1+KIutyoRbkkabUtGlJ1fE=";
};
nativeBuildInputs = [
autoreconfHook
makeWrapper
];
buildInputs = [
gettext
libtool
texinfo
];
enableParallelBuilding = true;
meta = with lib; {
description = "Cross-platform file change monitor with multiple backends";
mainProgram = "fswatch";
homepage = "https://github.com/emcrisostomo/fswatch";
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ pSub ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
libv4l,
gd,
}:
stdenv.mkDerivation rec {
pname = "fswebcam";
version = "20200725";
src = fetchurl {
url = "https://www.sanslogic.co.uk/fswebcam/files/fswebcam-${version}.tar.gz";
sha256 = "1dazsrcaw9s30zz3jpxamk9lkff5dkmflp1s0jjjvdbwa0k6k6ii";
};
buildInputs = [
libv4l
gd
];
meta = {
description = "Neat and simple webcam app";
mainProgram = "fswebcam";
homepage = "http://www.sanslogic.co.uk/fswebcam";
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Only;
};
}